Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: PL/pgSQL 2
Дата
Msg-id 20140902142411.GD27095@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: PL/pgSQL 2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/pgSQL 2  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On 2014-09-02 10:21:50 -0400, Tom Lane wrote:
> Marko Tiikkaja <marko@joh.to> writes:
> > For example:
> 
> > UPDATE foo WHERE bar = 1;  -- must affect exactly one row
> > PERFORM UPDATE foo WHERE bar = 1; -- can affect any number of rows
> 
> FWIW, I agree with the position that this would be a completely wrong
> thing to do.  UPDATE should work like it does in plain SQL.  If you want
> a restriction to "exactly one row", that needs to be a modifier.
> 
> I take no position on how the modifier should be spelled, though.

Personally I think 
ONE ROW UPDATE ...
reads nicely and SQL-ish. But it's not very expandable to other numbers.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: ALTER SYSTEM RESET?
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: PL/pgSQL 2