Re: update question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: update question
Дата
Msg-id 26174.1133847937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: update question  (Matthew Peter <survivedsushi@yahoo.com>)
Список pgsql-sql
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
updatefrom 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Database query: Notification about change?
Следующее
От: Jenny
Дата:
Сообщение: need help