Re: GSOC13 proposal - extend RETURNING syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karol Trzcionka <karlikt(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GSOC13 proposal - extend RETURNING syntax
Date: 2013-05-03 03:02:48
Message-ID: 10005.1367550168@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Karol Trzcionka <karlikt(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-05-03 03:16:39 Re: Documentation epub format
Previous Message Michael Paquier 2013-05-03 01:39:18 Re: [PATCH] pgbench --throttle (submission 4)