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: return unimplemented error for plpgsql udfs with record input #105738

Merged

Conversation

rharding6373
Copy link
Collaborator

PLpgSQL UDFs should support RECORD argument types as input, but there are currently issues with assignment of underlying tuple types in RECORDs that prevent CRDB from supporting them. We explicitly note this feature as unsupported until the issues are resolved.

Epic: None
Informs: #105713

Release note: None

@rharding6373 rharding6373 requested a review from DrewKimball June 28, 2023 17:52
@rharding6373 rharding6373 requested a review from a team as a code owner June 28, 2023 17:52
@blathers-crl
Copy link

blathers-crl bot commented Jun 28, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

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

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator Author

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball)


pkg/sql/opt/optbuilder/create_function.go line 153 at r1 (raw file):

					"SQL functions cannot have arguments of type record"))
			} else if language == tree.FunctionLangPLpgSQL {
				panic(unimplemented.NewWithIssueDetail(105713,

Sorry, I meant to include this in a previous PR but forgot to amend to the commit.

PLpgSQL UDFs should support `RECORD` argument types as input, but there
are currently issues with assignment of underlying tuple types in
`RECORD`s that prevent CRDB from supporting them. We explicitly note
this feature as unsupported until the issues are resolved.

Epic: None
Informs: cockroachdb#105713

Release note: None
@rharding6373 rharding6373 force-pushed the 20230626_udf_values_type_res_105120 branch from d596886 to 6ba83d8 Compare June 28, 2023 18:01
Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

Sorry, I meant to include this in a previous PR but forgot to amend to the commit.

No worries, thanks for the fix!
:lgtm:

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@rharding6373
Copy link
Collaborator Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 29, 2023

Build succeeded:

@craig craig bot merged commit ab24188 into cockroachdb:master Jun 29, 2023
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.

3 participants