Re: [PATCH] Implement INSERT SET syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Implement INSERT SET syntax
Date
Msg-id 24422.1585075555@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Implement INSERT SET syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> No doubt that's all fixable, but the realization that some cases of
> this syntax are *not* just syntactic sugar for standards-compliant
> syntax is giving me pause.  Do we really want to get out front of
> the SQL committee on extending INSERT in an incompatible way?

One compromise that might be worth thinking about is to disallow
multiassignments in this syntax, so as to (1) avoid the possibility
of generating something that can't be represented by standard INSERT
and (2) get something done in time for v13.  The end of March is not
that far off.  Perhaps somebody would come back and extend it later,
or perhaps not.

A slightly more ambitious compromise would be to allow multiassignment
only when the source can be pulled apart into independent subexpressions,
comparable to the restriction we used to have in UPDATE itself (before
8f889b108 or thereabouts).

In either case the transformation could be done right in gram.y and
a helpful error thrown for unsupported cases.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeremy Finzel
Date:
Subject: How to only auto-restart BGW only on crash or _PG_init
Next
From: Robert Haas
Date:
Subject: Re: Add A Glossary