-
Notifications
You must be signed in to change notification settings - Fork 473
document RETURN NEXT and RETURN QUERY #19589
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
Conversation
Files changed:
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks!
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
?
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
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. |
There was a problem hiding this comment.
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!
Co-authored-by: Florence Morris <[email protected]>
DOC-13121