Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: PL/pgSQL 2
Дата
Msg-id 540631DB.2000409@wi3ck.info
обсуждение исходный текст
Ответ на PL/pgSQL 2  (Joel Jacobson <joel@trustly.com>)
Список pgsql-hackers
Without having read the entire thread ...

On 09/01/2014 05:04 AM, Joel Jacobson wrote:
>  From the top of my head, these are Things I personally would want to
> see in plpgsql2:
> + Make UPDATE/INSERT/DELETE throw error if they didnt' modify exactly 1
> row, as that's the most common use-case, and provide alternative syntax
> to modify multiple or zero rows.

I think this is a completely flawed proposal "by definition". SQL itself 
does not make such assumption and as a SET oriented language, never 
should. A SET is zero or more tuples. Would you also suggest that the 
PostgreSQL backend throw an ERROR if an UPDATE/INSERT/DELETE doesn't 
modify exactly 1 row? If not, explain why there should be a difference 
between SQL executed from the frontend and SQL executed by a PL/pgSQL 
function.

-1 from me.


> + Change all warnings into errors

I suggest being slightly more selective on that one.


Regards,
Jan

-- 
Jan Wieck
Senior Software Engineer
http://slony.info



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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: PL/pgSQL 2
Следующее
От: David Johnston
Дата:
Сообщение: Re: PL/pgSQL 2