Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: PL/pgSQL 2
Дата
Msg-id 5405F58C.3070201@joh.to
обсуждение исходный текст
Ответ на Re: PL/pgSQL 2  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: PL/pgSQL 2  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
On 9/2/14 6:03 PM, Heikki Linnakangas wrote:
> Marko posted a patch to add assertions to PL/pgSQL last year, see
> http://www.postgresql.org/message-id/5234AF3F.4000409@joh.to. It was a
> long thread, but in the end I think everyone was more or less OK with
> the syntax "ASSERT <condition>;". I also think that syntax is fine, and
> it would be a nice feature, assuming we can avoid reserving the ASSERT
> keyword.

Did you really mean to say "more or less OK"?  I didn't wade through the 
thread, but my recollection is that I was the only one truly OK with it, 
some people expressed concerns but appeared undecided, and the rest of 
the participants were completely against it.

> I think that would actually be a good way to enforce the rule that an
> UPDATE only updates a single row. Just put a "ASSERT ROW_COUNT=1;" after
> the update.

I agree with Joel here; I think a shorter syntax is necessary.


.marko



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PL/pgSQL 2
Следующее
От: Joel Jacobson
Дата:
Сообщение: Re: PL/pgSQL 2