Skip site navigation (1) Skip section navigation (2)

Re: Allow an alias for the target table in UPDATE/DELETE

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Allow an alias for the target table in UPDATE/DELETE
Date: 2006-01-22 18:51:26
Message-ID: 43D3D42E.30209@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches

Tom Lane wrote:

>The effect of this, as Andrew says, is that in this particular context
>you can't write SET as an alias unless you write AS first.  This is
>probably not going to surprise anyone in the UPDATE case, since the
>ambiguity inherent in writing
>	UPDATE foo set SET ...
>is pretty obvious.  However it might surprise someone in the DELETE
>context.  
>  
>

You probably avoid that if you have a separate rule for the DELETE case. 
That raises this question: how far do we want to go in unfactoring the 
grammar to handle such cases?

cheers

andrew

In response to

pgsql-patches by date

Next:From: Neil ConwayDate: 2006-01-22 18:59:18
Subject: Re: Allow an alias for the target table in UPDATE/DELETE
Previous:From: Neil ConwayDate: 2006-01-22 18:50:25
Subject: Re: TupleDesc refcounting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group