Support for RETURNING: multi-row modify with multi-row output #32

Merged
merged 1 commit into from Aug 9, 2012

Projects

None yet

2 participants

@solidsnack
Contributor

I have endeavoured to document this in style similar to the other query/statement mangling functions.

This functionality can be quite valuable, allowing the database to handle a great many book-keeping items.

@solidsnack
Contributor

Sorry about prior request; should not have asked to merge in from master.

@lpsmith
Owner
lpsmith commented Aug 9, 2012

Oh, no problem, though I will copy my response to the other request:

You can simply the implementation of returning to returning = query. ;-)

Though this question/issue does come up on a semi-regular basis, and actually it was Carl Howells that first pointed out to me that postgresql-simple already supports returning clauses, after I was fretting over this same issue. So at the very least, documentation needs to be improved, though perhaps there is a case for adding a separate "returning" operator.

@lpsmith
Owner
lpsmith commented Aug 9, 2012

Hmm, my apologies, I'm not correct in my assessment, am I?

@solidsnack
Contributor

This returning supports multiple input rows; I do not believe query does.

@lpsmith
Owner
lpsmith commented Aug 9, 2012

Yeah, you are right.

@lpsmith lpsmith merged commit b3b0ef2 into lpsmith:master Aug 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment