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

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: why semicolon after begin is not allowed in postgresql?
Дата
Msg-id 5294D9F2.2070005@agliodbs.com
обсуждение исходный текст
Ответ на 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 11/25/2013 03:36 PM, David Johnston wrote:
> Doh!
> 
> IF / THEN / ELSE / ENDIF .... (concept, not syntax)
> 
> That also does help to reinforce the point being made here...
> 
> David J.

What point?

PL/pgSQL has been in use for 14 years.  During that entire time, it has
always used a block-based syntax where only the end of the block takes
semicolons; this applies not just to BEGIN ... END, but also to IF ...
END IF, LOOP ... END LOOP, etc.  It's a feature of the language.   One
might as well ask why Python doesn't take semicolons at the end of the
line, or why Perl requires them, or why Java has all those squiggly
brackets.

PostgreSQL is very accepting of new procedural languages; you could
always create your own, with whatever syntax you want.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Extension Templates S03E11
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Logging WAL when updating hintbit