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: use unimplemented error rather than syntax error for PL/pgSQL #96726

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Feb 7, 2023

fixes #96720

This change does not affect anything user-facing, but it allows us to parse CREATE FUNCTION statements that use LANGUAGE plpgsql. The plpgsql grammar is still not supported, so this will still show an error to the user. However, since parsing succeeds, the statement will be sent to telemetry logs, allowing us to analyze which parts of the plpgsql grammar that customers are trying to use.

Release note: None

@rafiss rafiss requested a review from a team February 7, 2023 17:55
@rafiss rafiss requested review from a team as code owners February 7, 2023 17:55
@rafiss rafiss requested a review from yuzefovich February 7, 2023 17:55
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss requested review from mgartner and chengxiong-ruan and removed request for yuzefovich February 7, 2023 18:15
Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! :lgtm:

Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @chengxiong-ruan)

This change does not affect anything user-facing, but it allows us to
parse CREATE FUNCTION statements that use `LANGUAGE plpgsql`. The
plpgsql grammar is still not supported, so this will still show an error
to the user. However, since parsing succeeds, the statement will be sent
to telemetry logs, allowing us to analyze which parts of the plpgsql
grammer that customers are trying to use.

Release note: None
@rafiss rafiss force-pushed the allow-language-plpgsql branch from 16dd33e to 6b34dfb Compare February 7, 2023 18:28
Copy link
Contributor

@chengxiong-ruan chengxiong-ruan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice~

@rafiss
Copy link
Collaborator Author

rafiss commented Feb 7, 2023

tftr!

bors r=chengxiong-ruan,mgartner

@craig
Copy link
Contributor

craig bot commented Feb 7, 2023

Build succeeded:

@craig craig bot merged commit 0a65a4e into cockroachdb:master Feb 7, 2023
@blathers-crl
Copy link

blathers-crl bot commented Feb 7, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 6b34dfb to blathers/backport-release-22.2-96726: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: allow parsing of CREATE FUNCTION LANGUAGE pl/pgsql, before supporting the full grammar
4 participants