From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bob Kruger <bkruger(at)mindspring(dot)com> |
Cc: | pgsql-sql(at)postgreSQL(dot)org, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [SQL] Updating non atomic values |
Date: | 1999-06-12 22:36:19 |
Message-ID: | 23821.929226979@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Bob Kruger <bkruger(at)mindspring(dot)com> writes:
> Is there a way to update non atomic values in Postgres?
> Example:
> update t3 set t3.fld[1] = 0 where t3.fld[1] = 5 ;
> ERROR: parser: parse error at or near "="
Bob, the correct syntax is
update t3 set fld[1] = 0 where t3.fld[1] = 5 ;
UPDATE doesn't allow explicit specification of the table containing
a field to be updated; you have to write just the field name before the
"=". The parser's error message about that could stand improvement...
There are a whole bunch of bugs associated with arrays :-(, but this
behavior isn't one of them. I hope to get some time to clean up the
array code for 6.6 or 6.7.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | 최진백 | 1999-06-13 02:10:40 | argument |
Previous Message | cfogarty | 1999-06-12 16:26:41 |
From | Date | Subject | |
---|---|---|---|
Next Message | Brett W. McCoy | 1999-06-13 17:37:50 | Re: [SQL] DISTINCT not working |
Previous Message | Oleg Bartunov | 1999-06-12 20:14:10 | Re: [SQL] Select like when searching for whole word and optimizing it |