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

From Tom Lane
Subject Re: GSOC13 proposal - extend RETURNING syntax
Date
Msg-id 10005.1367550168@sss.pgh.pa.us
Whole thread Raw
In response to Re: GSOC13 proposal - extend RETURNING syntax  (Karol Trzcionka <karlikt@gmail.com>)
Responses Re: GSOC13 proposal - extend RETURNING syntax  (Karol Trzcionka <karlikt@gmail.com>)
List pgsql-hackers
Karol Trzcionka <karlikt@gmail.com> writes:
> It will not solve the problems:
> 1. How to access to old rows if the table is named "BEFORE"?

The user can simply choose to use a different table alias, as Andres
explained upthread.  If any table's active alias is "before" (or
"after"), we just don't activate the corresponding implicit alias.

> 2. Should AFTER for DELETE and BEFORE for INSERT be allowed? If yes what
> should they return?

These cases should certainly fail.  Now, IMO there's no very good reason
to alter the behavior at all for INSERT/DELETE; only UPDATE has an issue
here.  But if we were going to support the extra aliases in those
commands, only the ones that actually make sense should be allowed.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] pgbench --throttle (submission 4)
Next
From: Peter Eisentraut
Date:
Subject: Re: Documentation epub format