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: implement ON UPDATE in optimizer #69057

Closed
pawalt opened this issue Aug 17, 2021 · 0 comments · Fixed by #69091
Closed

sql: implement ON UPDATE in optimizer #69057

pawalt opened this issue Aug 17, 2021 · 0 comments · Fixed by #69091
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@pawalt
Copy link
Contributor

pawalt commented Aug 17, 2021

As of #68803, ON UPDATE syntax is implemented. This issue tracks the progress of using ON UPDATE to apply expressions when rows are updated. This issue is not concerned with validation or testing - it is only to track the functionality.

Epic CRDB-9148

@pawalt pawalt added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Aug 17, 2021
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 18, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): This PR adds ON UPDATE expression to allow users to
evaluate expressions when a row is updated.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 19, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 19, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 19, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 20, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 23, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 23, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 23, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 24, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
pawalt added a commit to pawalt/cockroach that referenced this issue Aug 24, 2021
This PR implements ON UPDATE expressions.

Resolves cockroachdb#69057

Release note (sql change): An ON UPDATE expression can now be added to a
column. Whenever a row is updated without modifying the ON UPDATE column,
the column's ON UPDATE expression is re-evaluated, and the column is
updated to the result.
craig bot pushed a commit that referenced this issue Aug 24, 2021
68500: sql: support "default" default privileges r=ajwerner a=RichardJCai

sql: support "default" default privileges

Release note (sql change): Roles have a default set of default privileges
for example, a role has ALL privileges on all objects as it's default privileges
when it creates the object. Additionally the public role having Usage is a default
privilege.

This is important as now when a user creates an table, sequence, type or schema, it will
automatically have ALL privileges on it, and Public will have USAGE on types.

This can be altered, ALTER DEFAULT PRIVILEGE FOR ROLE rolea REVOKE ALL ON ... FROM rolea
will remove the default set of default privileges on the specified object from the role.

Resolves #67377

Release justification: Bug fix / enhancement to new feature that is not yet in production.
Default privileges are being added in 21.2, this is an enhancement to match
postgres' behaviour.

69091: sql: implement ON UPDATE expressions r=arulajmani,mgartner,ajwerner,rytaft a=pawalt

This PR implements ON UPDATE expressions.

Resolves #69057

Release note (sql change): This PR adds ON UPDATE expression to allow users to
evaluate expressions when a row is updated.

69264: colbuilder: fix expr planning when RHS is a non-constant tuple r=yuzefovich a=yuzefovich

During the expression planning, if the RHS is a tuple, we attempt to
evaluate it if it is a constant tuple (i.e. it only contains constant
expressions). Previously, if this pre-evaluation failed, we would bail
on the vectorized planning and fall back to wrapping a row-execution
processor. This is suboptimal because we have default operators for such
scenarios. This commit refactors the code slightly so that we
pre-evaluate tuples only if they are constant.

It is not a bug fix per se (thus, there is no release note), and it
won't be backported, yet I think it is beneficial to get it into 21.2.

Release note: None

Release justification: low-risk performance fix.

69308: sql/schemachanger: use non-`ignore` build tag r=rail a=rickystewart

When using the `race` configuration, Bazel was building the Go stdlib
with the `ignore` build tag. Evidently the stdlib doesn't build with
this tag, which makes sense. Here I just rename the tag so we don't have
to worry about it.

Closes #69240.

Release justification: Non-production code change
Release note: None

Co-authored-by: richardjcai <caioftherichard@gmail.com>
Co-authored-by: Peyton Walters <peyton.walters@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
@craig craig bot closed this as completed in 9d21ab3 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant