feat: add configurable write_functions#1236
Conversation
|
@levkk should new features like these be compatible with legacy parser path too ? |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| pub database: String, | ||
| /// Functions that should be treated as write-only. | ||
| #[serde(default)] | ||
| pub functions: Vec<String>, |
There was a problem hiding this comment.
Functions need to be fully qualifiable, e.g.: partman.create_partition is a write function, while create_partition(array) may not be.
There was a problem hiding this comment.
added optional schema, not sure if you were referring to this ?
That's fine, we'll be removing the legacy parser shortly (tm). |
| # [[write_functions]] | ||
| # database = "pgdog" | ||
| # schema = "partman" # optional | ||
| # functions = ["my_write_fn", "\"Set_Customer_Balance\""] |
There was a problem hiding this comment.
@levkk I noticed a behavior gap around identifier normalization from pgdog.toml vs PostgreSQL semantics.
Right now, for write_functions, we normalize config identifiers with PG-like rules (unquoted -> lowercase, quoted -> case-preserving), but this is not consistently applied across other config-driven identifier matching paths in PgDog.
Description
Testing
Added unit and integration coverage for routing, schema qualification, and PG identifier semantics.
Related Issues
#623