Re: why semicolon after begin is not allowed in postgresql?

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: why semicolon after begin is not allowed in postgresql?
Дата
Msg-id 5293C2EC.10603@catalyst.net.nz
обсуждение исходный текст
Ответ на Re: why semicolon after begin is not allowed in postgresql?  (AK <alkuzo@gmail.com>)
Ответы Re: why semicolon after begin is not allowed in postgresql?  (David Johnston <polobo@yahoo.com>)
Список pgsql-hackers
On 26/11/13 09:42, AK wrote:
> Kevin,
>
> I do see your logic now, but this thing is a common mistake - it means that
> this seems counter-intuitive to some people. What would happen if we applied
> Occam's razor and just removed this rule?
>
> All existing code would continue to work as is, and we would have one less
> rule to memorize. That would make PostgreSql a slightly better product,
> right?
>

Perhaps not a good use of Mr Occam's razor. Postgres supports many 
procedural languages (e.g plperl, plpython) and all these have different 
grammar rules from SQL - and from each other. We can't (and shouldn't) 
try altering them to be similar to SQL - it would defeat the purpose of 
providing a procedural environment where the given language works as 
advertised.

So in the case of plpgsql - it needs to follow the Ada grammar, 
otherwise it would be useless.

The fact that different languages may have similar or the same keywords 
with different grammar and punctuation rules is just a fact or life (I 
trip over that often when switching from perl to python in the same day)!

Regards

Mark




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: MultiXact bugs