On 9/4/14 4:09 PM, Shaun Thomas wrote:
On 09/03/2014 04:19 PM, Hannu Krosing wrote:
1. Conditions for number of rows returned by SELECT or touched by
UPDATE or DELETE
Now that I think upon this... don't we already have it?
SELECT ... LIMIT 1
No, that just hides any bugs. We want the opposite: any bugs or
problems should be obvious. If the query returns or touches more than
one row, that should raise an error, not just give you a random one and
call it a day.
That already solves the purported problem of multiple results in SELECT
INTO as well. Could we possibly extend that to UPDATE and DELETE syntax too?
Again, this is a different problem, but LIMIT syntax for UPDATE and
DELETE has been proposed, see:
http://www.postgresql.org/message-id/CADB9FDf-Vh6RnKAMZ4Rrg_YP9p3THdPbji8qe4qkxRuiOwm=m...@mail.gmail.com
.marko
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers