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 21060.1137960445@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?

> 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

pgsql-patches by date:

Previous
From: Alexey Slynko
Date:
Subject: TODO item: locale per database patch (new iteration)
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Different exponent in error messages