On 2015-05-21 20:28:41 -0300, Alvaro Herrera wrote: > That said, I'm not sure about having it be the same, either: first, I > don't think we need to update the fe-exec.c code at all -- I mean, all > the things I see there are very old compatibility stuff; reporting the > OID of the just-inserted row? Seriously, who has OIDs in user tables > anymore? Surely we wouldn't try to do that for INSERT ON CONFLICT DO > UPDATE at all ... if anyone wants that functionality, they can use > RETURNING, which is far saner.
The oid currently is reported for UPSERT... I agree it's not worth much, but it seems pointless to break it for a single command. > As for PQcmdTuples, what would a single number returned mean? Are we > returning the sum of both inserted and updated tuples? Yes. > Isn't this a bit odd? Imo it's pretty much in line with what's done with INSTEAD OF, FDWs and such. > If the number is useful, then perhaps we should distinguish the cases; > and if it's not useful, why not just return zero? There's libraries/frameworks checking if an insert succeeded by looking at that number, and it seems like a bad idea to needlessly break those. So I think we're good with ripping it out. Peter? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers