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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, 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 19:20:31
Message-ID: 19830.1137957631@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Alexey Slynko 2006-01-22 19:57:27 TODO item: locale per database patch (new iteration)
Previous Message Neil Conway 2006-01-22 18:59:18 Re: Allow an alias for the target table in UPDATE/DELETE