-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deparse altered "CREATE TABLE" statement, removed WITHOUT TIME ZONE #55
Comments
so this is not technically a bug since https://www.postgresql.org/docs/9.1/datatype-datetime.html So in your example, the type wasn't actually changed, but the syntax expressing it was. |
Curious, it makes sense but I don't understand why the query fingerprint changed. Isn't finger print supposed to remain same for various syntaxes of the same query? 🤔 |
two queries can create the same AST. One AST, however, can only create one query. |
Thank you, but do you think that fingerprint of two queries which produce the same AST should be the same? |
what I'm suggesting is that, the deparser is not a bijective function, in other words It's lossy. So I think the fingerprints of two different queries should each be unique, however, once they are passed through the parser/deparser and back, they would only ever produce one query and thus one fingerprint. |
Got it, thank you for taking the time to explain. |
Original query (with fingerprint 2c0d1f29c30f5177):
Deparsed query (with fingerprint 13401b610a7be108):
timestamp without timezone
totimestamp
.To reproduce:
Schema at https://github.com/prisma/database-schema-examples/tree/main/postgres/jira
The text was updated successfully, but these errors were encountered: