You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with postgresql-parser to intercept and rewrite some queries to a postgresql database.
One problem I have encountered is that the formatter will output "STRING" by default for string data type. PostgreSQL does not support this, instead the data type name is "TEXT". CockroachDB supports "TEXT" as an alias for "STRING" [1]
In order to make query-rewriting work, I've patched postgresql-parser to output "TEXT" data type by default instead of "STRING". I think this could be a reasonable default since CockroachDB supports both.
I dont think it's a reasonable default since "TEXT" doesn't have size constraints, it's a string of any length.
Cockroach's "STRING" datatype can be limited by doing "STRING(X)"
Hi,
I'm experimenting with postgresql-parser to intercept and rewrite some queries to a postgresql database.
One problem I have encountered is that the formatter will output "STRING" by default for string data type. PostgreSQL does not support this, instead the data type name is "TEXT". CockroachDB supports "TEXT" as an alias for "STRING" [1]
In order to make query-rewriting work, I've patched postgresql-parser to output "TEXT" data type by default instead of "STRING". I think this could be a reasonable default since CockroachDB supports both.
[1] https://www.cockroachlabs.com/docs/stable/string.html
The text was updated successfully, but these errors were encountered: