Skip to content
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: support UPDATE ONLY syntax #53552

Closed
rafiss opened this issue Aug 27, 2020 · 4 comments · Fixed by #54277
Closed

sql: support UPDATE ONLY syntax #53552

rafiss opened this issue Aug 27, 2020 · 4 comments · Fixed by #54277
Assignees
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@rafiss
Copy link
Collaborator

rafiss commented Aug 27, 2020

In Postgres, you can write a query like UPDATE ONLY tablename .... Here's what the docs say:

If ONLY is specified before the table name, matching rows are updated in the named table only. If ONLY is not specified, matching rows are also updated in any tables inheriting from the named table. Optionally, * can be specified after the table name to explicitly indicate that descendant tables are included.

https://www.postgresql.org/docs/10/sql-update.html

I've only encountered this in one test case from the PGJDBC test suite.

Perhaps this would be a candidate for "good first issue" -- I'm adding to the SQL Features triage board so someone with more knowledge can decide to add that label.

@rafiss rafiss added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect labels Aug 27, 2020
@rohany
Copy link
Contributor

rohany commented Aug 31, 2020

It seems like we'd want to just add parsing support for this. We don't support table inheritance (nor have any plans to), so that would be about it.

@solongordon solongordon added E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue labels Sep 1, 2020
@solongordon
Copy link
Contributor

+1, let's only add syntax support and treat it as a no-op.

@propainter
Copy link

would like to pick this, please guide

@otan otan self-assigned this Sep 9, 2020
@otan
Copy link
Contributor

otan commented Sep 9, 2020

hey @propainter, unfortunately saw this too late and we're looking at doing this now.
they are some very well guided issues available in #49203

@otan otan removed E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue labels Sep 9, 2020
@otan otan assigned angelapwen and unassigned otan Sep 9, 2020
@craig craig bot closed this as completed in 2a11415 Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants