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

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 20:07:25
Message-ID: 21060.1137960445@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> Did you actually test this?

> neilc=# create table t1 (a int, b int);
> CREATE TABLE
> neilc=# update t1 set set a = 500 where set.a > 1000;
> UPDATE 0

I get 

regression=# update t1 set set a = 500 where set.a > 1000;
ERROR:  syntax error at or near "a" at character 19
LINE 1: update t1 set set a = 500 where set.a > 1000;
                          ^

I think possibly you put the %nonassoc entry in the wrong place --- it
has to go someplace before the UMINUS entry to get the desired effect.
My fault for putting up a non-context diff.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Milen A. RadevDate: 2006-01-23 09:14:03
Subject: Re: BUG #2195: log_min_messages crash server when in DEBUG3 to 5
Previous:From: Alexey SlynkoDate: 2006-01-22 19:57:27
Subject: TODO item: locale per database patch (new iteration)

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