Re: GSOC13 proposal - extend RETURNING syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GSOC13 proposal - extend RETURNING syntax
Date
Msg-id 26778.1367511799@sss.pgh.pa.us
Whole thread Raw
In response to Re: GSOC13 proposal - extend RETURNING syntax  (Marko Tiikkaja <marko@joh.to>)
Responses Re: GSOC13 proposal - extend RETURNING syntax  (Andres Freund <andres@2ndquadrant.com>)
Re: GSOC13 proposal - extend RETURNING syntax  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Marko Tiikkaja <marko@joh.to> writes:
> What I'm more interested in is: how can we make this feature work in 
> PL/PgSQL where OLD means something different?

That's a really good point: if you follow this approach then you're
creating fundamental conflicts for use of the feature in trigger
functions or rules, which will necessarily have conflicting uses of
those names.  Yeah, we could define scoping rules such that there's
an unambiguous interpretation, but then the user is just out of luck
if he wants to reference the other definition.  (This problem is
probably actually worse if you implement with reserved words rather
than aliases.)

I'm thinking it would be better to invent some other notation for access
to old-row values.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: GSOC13 proposal - extend RETURNING syntax
Next
From: Andres Freund
Date:
Subject: Re: GSOC13 proposal - extend RETURNING syntax