From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew Peter <survivedsushi@yahoo.com>
Cc: Jaime Casanova <systemguards@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: update question
Date: Tue, 06 Dec 2005 00:45:37 -0500
Message-ID: <26174.1133847937@sss.pgh.pa.us> (raw)
In-Reply-To: <20051205234123.82345.qmail@web35208.mail.mud.yahoo.com>
References: <20051205234123.82345.qmail@web35208.mail.mud.yahoo.com>
Matthew Peter <survivedsushi@yahoo.com> writes:
> it's in a loop so there's an extra comma at the end so i was thinking i could put in a throw away value to keep the update from breaking if there's an additional comma
The best thing is to fix your loop logic. Usually it's not hard to emit
a comma only if one is needed.
If you're intent on using a broken loop, you could do "foo = foo" where
foo is any table column you didn't yet assign to. Consider though the
corner case where you've already assigned all the columns. Best bet
is to fix your loop...
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, survivedsushi@yahoo.com, systemguards@gmail.com
Subject: Re: update question
In-Reply-To: <26174.1133847937@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