Skip to content

Conversation

taroface
Copy link
Contributor

@taroface taroface commented May 7, 2025

@taroface taroface requested a review from DrewKimball May 7, 2025 20:11
Copy link

github-actions bot commented May 7, 2025

Files changed:

Copy link

netlify bot commented May 7, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 322d4ea
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/681cf655756ac900086db0bd

Copy link

netlify bot commented May 7, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 322d4ea
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/681cf6551f1aae0008c5f622

Copy link

netlify bot commented May 7, 2025

Netlify Preview

Name Link
🔨 Latest commit 322d4ea
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/681cf655d586550008713cc7
😎 Deploy Preview https://deploy-preview-19589--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@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.

LGTM

Copy link

@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.

LGTM

Thanks!

@taroface taroface requested a review from florence-crl May 8, 2025 15:46
Copy link
Contributor

@florence-crl florence-crl left a comment

Choose a reason for hiding this comment

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

lgtm, pending non-blocking suggestions

$$ LANGUAGE PLpgSQL;
~~~

Use `RETURN QUERY` within a set-returning function to append the results of a SQL query to the result set.
Copy link
Contributor

Choose a reason for hiding this comment

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

clarification - can it be anything other than a SELECT?

Suggested change
Use `RETURN QUERY` within a set-returning function to append the results of a SQL query to the result set.
Use `RETURN QUERY` within a set-returning function to append the results of a `SELECT` query to the result set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe it can, such as VALUES -- I think "results of a SQL query" implies that the SQL query produces a result.

#### `RETURN`

Add a `RETURN` statement to a routine with an `OUT` parameter or `VOID` return type to exit the routine immediately.
Add a `RETURN` statement to a routine with an `OUT` parameter, `RETURNS VOID` clause, or `RETURNS SETOF` clause to exit the routine immediately.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
Add a `RETURN` statement to a routine with an `OUT` parameter, `RETURNS VOID` clause, or `RETURNS SETOF` clause to exit the routine immediately.
Add a `RETURN` statement to immediately exit a routine that includes an `OUT` parameter, `RETURNS VOID` clause, or `RETURNS SETOF` clause.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to keep the original for consistency with the other sections!

@taroface taroface enabled auto-merge (squash) May 8, 2025 18:22
@taroface taroface merged commit 59ffbc0 into main May 8, 2025
6 checks passed
@taroface taroface deleted the set-returning-plpgsql-functions branch May 8, 2025 18:38
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