Re: Allow an alias for the target table in UPDATE/DELETE - Mailing list pgsql-patches

From Tom Lane
Subject Re: Allow an alias for the target table in UPDATE/DELETE
Date
Msg-id 19830.1137957631@sss.pgh.pa.us
Whole thread Raw
In response to Re: Allow an alias for the target table in UPDATE/DELETE  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Did you actually test this?

No, I was just looking at the y.output file to see what would happen.

> neilc=# update t1 set set a = 500 where set.a > 1000;
> UPDATE 0
> (Using essentially the patch you posted.)

[ scratches head... ]  That shouldn't have worked.  I'll have to look
again.

> Well, if necessary we can just use an alternate production for the
> DELETE case, as there is no SET ambiguity to worry about.

Yeah, I thought of that too and rejected it as being too much trouble
for too small a case.  I'm really considerably more worried about the
question of whether attaching a precedence to SET might cause trouble
later.  But it's only a hypothetical problem at this point.

> So I'm inclined to favor #2.

OK, motion carries.  I'll check what's happening in the case above
and commit if there's not something wrong.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Allow an alias for the target table in UPDATE/DELETE
Next
From: Alexey Slynko
Date:
Subject: TODO item: locale per database patch (new iteration)