| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
| Cc: | David Gagnon <dgagnon(at)siunik(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Why UPDATE gl SET gl.glnum = gl.glnum; cause error |
| Date: | 2005-07-08 14:58:36 |
| Message-ID: | 22527.1120834716@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> On Fri, 8 Jul 2005, David Gagnon wrote:
>> UPDATE gl SET gl.glnum = gl.glnum
>> ERROR: column "gl" of relation "gl" does not exist
>>
>> the TABLE.COLUMN is not in the SQL standard ?
> For at least 92 (and I'm almost certain 99) not in the SET list. It uses
> column name (which is a plain identifier) rather than a column reference.
More specifically, it'd be OK to write
SET glnum = gl.glnum
but not as you have it.
Since 8.0 Postgres uses the above syntax to refer to assignment to a
subfield of a composite-type field, so that's why you get a complaint
about a nonexistent column instead of a flat-out syntax error.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Bowman | 2005-07-08 15:11:46 | Postgresql 7.4.8 inconsistent index usage |
| Previous Message | Marc G. Fournier | 2005-07-08 14:57:18 | Re: mail change for list? |