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
sql: allow parsing of CREATE [TEMP] TABLE ... ON COMMIT #46594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let Rohan comment on correctnes, but I'd like to challenge y'all to start thinking about this question:
how can we teach current and future SQL team members to systematically return error objects with linked issues for unimplemented / partially implemented features?
It's not sustainable for me to catch this all the time. We need a better way.
ML/AI 🤓 on a serious note, i think this is a just a thing for knowledge sharing and reinforcement. i'm trying to think "can we add a linter for it", and the answer is "probably for sql.y" but not inside the go files. |
LGTM aside from missing help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ditto rohan
Reviewed 2 of 10 files at r1, 2 of 7 files at r2, 1 of 1 files at r3.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan)
PostgreSQL allows temp tables to have custom behavior ON COMMIT to drop the table or delete the rows that have been added. We do not support this behaviour, but we do for the default (PRESERVE ROWS). Add parsing for ON COMMIT, erroring for the DELETE ROWS and DROP case. Furthermore, add the same error message as PostgreSQL if a non-temporary table has the ON COMMIT keyword. Release justification: low risk, high benefit changes to existing functionality Release note (sql change): Allow the ON COMMIT syntax for CREATE TABLE.
bors r=rohany,knz |
Build succeeded |
Resolves #46555.
PostgreSQL allows temp tables to have custom behavior ON COMMIT to drop
the table or delete the rows that have been added. We do not support
this behaviour, but we do for the default (PRESERVE ROWS).
Add parsing for ON COMMIT, erroring for the DELETE ROWS and DROP case.
Furthermore, add the same error message as PostgreSQL if a non-temporary
table has the ON COMMIT keyword.
Release justification: low risk, high benefit changes to existing
functionality
Release note (sql change): Allow the ON COMMIT syntax for CREATE TABLE.