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! |
That's fine, we'll be removing the legacy parser shortly (tm). |
| /// Functions that should be treated as write-only. | ||
| /// Each entry can be schema-qualified. | ||
| #[serde(default)] | ||
| pub functions: Vec<String>, |
There was a problem hiding this comment.
You want something like this:
[[write_functions]]
database = "prod"
name = "create_partition"
schema = "partman"This allows you to disambiguiate between the same function created in different schemas. It's not a common edge case, but it can happen, and we want to be able to scope all Postgres primitives we scan for using a fully qualified identifier. I know that functions can be overloaded, so we should consider capturing parameter data types as well, but for read/write separation it seems unlikely that one version of the function reads and the other one writes, so maybe that's not necessary for this.
Description
Testing
Added unit and integration coverage for routing, schema qualification, and PG identifier semantics.
Related Issues
#623