From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Warren <exec@shreve.net>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] sql statements
Date: Thu, 03 Feb 2000 13:03:43 -0500
Message-ID: <28636.949601023@sss.pgh.pa.us> (raw)
In-Reply-To: <005201bf6e80$4e97be60$0600a8c0@pams.com>
References: <005201bf6e80$4e97be60$0600a8c0@pams.com>
"David Warren" <exec@shreve.net> writes:
> UPDATE table1 SET val1 = 'test', SET val2 = 'test' WHERE recnum=1;
> This statement doesn't work for me. If I use only one SET per statement =
> it does. Is this supposed to be this way?
Yes. I don't know where you got the idea that the SET keyword should
appear multiple times, but the SQL92 syntax is perfectly clear that
it appears once:
<update statement: searched> ::=
UPDATE <table name>
SET <set clause list>
[ WHERE <search condition> ]
<set clause list> ::=
<set clause> [ { <comma> <set clause> }... ]
<set clause> ::=
<object column> <equals operator> <update source>
<update source> ::=
<value expression>
| <null specification>
| DEFAULT
<object column> ::= <column name>
> Also, the statement INSERT INTO table1 (val1, val2, ..., val68) VALUES =
> ('test','test',...,'test') gives me an error as well. There are 68 =
> elements I am trying to add in that one statement. If I trim it down to =
> 30 or so it is fine. Is it supposed to be this way?
How long is the resulting statement? There's an 8K limit on the length
of the query text in 6.5 and older releases (it's gone in current
sources though). If you're not hitting that then I dunno... what error
do you get exactly?
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, exec@shreve.net, pgsql-sql@hub.org
Subject: Re: [SQL] sql statements
In-Reply-To: <28636.949601023@sss.pgh.pa.us>
References: <005201bf6e80$4e97be60$0600a8c0@pams.com> <28636.949601023@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