--- description: globs: alwaysApply: false --- # Postgres Extension Development ## Key Concepts - ParadeDB extension (`pg_search`) is primarily written in Rust using the `pgrx` framework - Extensions follow the Postgres extension model with appropriate versioning - SQL interface design should be intuitive and follow Postgres conventions ## Extension Structure - Use proper error handling and reporting - Follow Postgres data type conventions - Ensure backward compatibility where possible - Document SQL interfaces thoroughly - Consider performance implications for database operations ## SQL API Design - Use descriptive, consistent naming for functions and types - Follow Postgres naming conventions (snake_case) - Provide sensible defaults for optional parameters - Include appropriate input validation - Document function parameters and return values ## Extension Testing - Test both SQL API and internal Rust code - Include edge cases and error scenarios - Test with different Postgres versions when relevant - Consider adding regression tests for fixed bugs ## Deployment Considerations - Ensure installation scripts handle dependencies correctly - Document version compatibility clearly - Provide upgrade paths for existing installations - Consider backward compatibility requirements