Re: Uniform UPDATE queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Uniform UPDATE queries
Дата
Msg-id 4420.1334766267@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Uniform UPDATE queries  (Dennis <dennis.verbeek@victorem.com>)
Ответы Re: Uniform UPDATE queries  (Dennis <dennis.verbeek@victorem.com>)
Список pgsql-sql
Dennis <dennis.verbeek@victorem.com> writes:
> When a query is written to update a table, the usual process is to list all the columns that need 
> updating. This could imply the creation of many possible queries for many columns. In an effort to 
> keep the UPDATE queries more uniform, less number of unique queries, a keyword similar to DEFAULT, 
> let's say CURRENT, is required to indicate that the current value must not change.

No it isn't.  Just write the name of the column, eg
update mytable set x = x, y = <new value>, z = z where ...

There's no reason to invent nonstandard syntax for this.
        regards, tom lane


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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Uniform UPDATE queries
Следующее
От: thomas veymont
Дата:
Сообщение: plpgsql : adding record variable to table