From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bob Kruger <bkruger@mindspring.com>
Cc: pgsql-sql@postgreSQL.org
Cc: pgsql-general@postgreSQL.org
Subject: Re: [SQL] Updating non atomic values
Date: Sat, 12 Jun 1999 18:36:19 -0400
Message-ID: <23821.929226979@sss.pgh.pa.us> (raw)
In-Reply-To: <3.0.5.32.19990608122730.007b4d50@mindspring.com>
Bob Kruger <bkruger@mindspring.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, bkruger@mindspring.com, pgsql-general@postgreSQL.org
Subject: Re: [SQL] Updating non atomic values
In-Reply-To: <23821.929226979@sss.pgh.pa.us>
References: <3.0.5.32.19990608122730.007b4d50@mindspring.com> <23821.929226979@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox