Re:One word in PostgreSQL unlocked a 9x performance improvement
by magicalhippo on Sunday June 14, 2020 @04:51PM
(#23521255)
> You know ahead of time how many items you're trying to insert, it would be completely pointless to return that.
I often use "insert into mytable(...) select ... from ... where ...", and I know I only want one row inserted.
In such cases checking that exactly one row was inserted is a very nice safeguard against buggy code/query, or in the freak case someone messed with the DB.
I often use "insert into mytable(...) select ... from ... where ...", and I know I only want one row inserted.
In such cases checking that exactly one row was inserted is a very nice safeguard against buggy code/query, or in the freak case someone messed with the DB.