Re: update question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Peter <survivedsushi(at)yahoo(dot)com>
Cc: Jaime Casanova <systemguards(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: update question
Date: 2005-12-06 05:45:37
Message-ID: 26174.1133847937@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Matthew Peter <survivedsushi(at)yahoo(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jenny 2005-12-06 08:38:38 need help
Previous Message Bruno Wolff III 2005-12-06 03:35:03 Re: Database query: Notification about change?