Re: proposal: plpgsql - Assert statement

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: plpgsql - Assert statement
Дата
Msg-id CAFj8pRCFuEZGvprEVEfN2+fHYbb1GA8P7mnQibna77+s8J5Syw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - Assert statement  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: proposal: plpgsql - Assert statement  (Petr Jelinek <petr@2ndquadrant.com>)
Re: proposal: plpgsql - Assert statement  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers


2014-11-18 21:27 GMT+01:00 Andrew Dunstan <andrew@dunslane.net>:

On 11/18/2014 02:53 PM, Jim Nasby wrote:
On 11/18/14, 9:31 AM, Andrew Dunstan wrote:

Frankly, I find this whole proposal, and all the suggested alternatives, somewhat ill-conceived. PLPGSQL is a wordy language. If you want something more terse, use something else. Adding these sorts of syntactic sugar warts onto the language doesn't seem like a terribly good way to proceed.

Such as?

The enormous advantage of plpgsql is how easy it is to run SQL. Every other PL I've looked at makes that WAY harder. And that's assuming you're in an environment where you can install another PL.

And honestly, I've never really found plpgsql to be terribly wordy except in a few cases ("assert" being one of them). My general experience has been that when I'm doing an IF (other than assert), I'm doing multiple things in the IF block, so it's really not that big a deal.



I frequently write one-statement bodies of IF statements. To me that's not a big deal either :-)

anybody did it, but it doesn't need so it is perfect :) I understand well to Jim' feeling.

I am looking to Ada 2005 language ... a design of RAISE WITH shows so RAISE statement is extensible in Ada too. Sure - we can live without it, but I don't think so we do some wrong with introduction RAISE WHEN and I am sure, so a live with this feature can be more fun for someone, who intensive use this pattern.
 

cheers

andrew

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: pg_test_fsync file descriptor leak
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement