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

2.1 RlsNotes: RETURNING clause always returns a row [DOC36] #45

Closed
firebird-automations opened this issue Jan 12, 2009 · 1 comment
Closed

Comments

@firebird-automations
Copy link

Submitted by: @paulvink

In the 2.1 rlsnotes, the note under "The RETURNING Clause" says:

" In DSQL, the statement always returns the set, even if the operation has no effect on any record. Hence, at this
" stage of implementation, the potential exists to return an "empty" set. (This may be changed in future.)

This is incorrect. The set *always* contains a row. If no records were affected by the statement, the fields in this row are NULL.
A correct text would be e.g:

" In DSQL, a statement with a RETURNING clause *always* returns exactly one row.
" If no record was actually inserted, updated or deleted, the fields in this row are all NULL.
" This behaviour may change in a later version of Firebird.
"
" In PSQL, if no row was affected by the statement, nothing is returned,
" and the receiving variables keep their existing values.

(See also README.returning.txt, under Limitations.)

Another thing: the section "RETURNING Clause for INSERT Statements" (inherited from 2.0) can be removed, because this information is now integrated in "The RETURNING Clause".

Yes, I'm working on the 2.1 LangRef Update ;-)

@firebird-automations
Copy link
Author

Modified by: @paulvink

assignee: Paul Vinkenoog [ paulvink ] => Helen Borrie [ helebor ]

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

No branches or pull requests

3 participants