Pavel Stehule <pavel.steh...@gmail.com> writes:
>>> Probably there is less risk than 7 years ago, but still creating own
>>> syntax isn't the best idea. This is syntactic sugar only and different
>>> from ANSi SQL or common standard.
It's more than syntactic sugar; you are going to have to invent semantics,
as well, because it's less than clear what partial-field assignments
Assume a table with an int-array column, and consider
INSERT INTO foo SET arraycol = 7, arraycol = 11;
I wonder what the other elements of the array will be set to, and what
the array dimensions will end up being.
If there's a default expression for the array column, does that change
If you say "we'll apply the default and then perform the SET assignments",
what's your criterion for deciding that you *don't* need to evaluate the
default? If the default has side effects (think nextval()) this is a
I don't say that these questions are unresolvable, but there is certainly
more here than meets the eye; and therefore there's a nonzero chance of
being blindsided if the SQL committee someday standardizes this syntax
and makes some different decisions about what it means.
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: