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

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: why semicolon after begin is not allowed in postgresql?
Дата
Msg-id CAHyXU0y1XK+eJTUxUWQBREDH6_4-gd0brY0E9XZ9LJXW6Dc+fg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: why semicolon after begin is not allowed in postgresql?  (Mike Blackwell <mike.blackwell@rrd.com>)
Список pgsql-hackers
On Fri, Nov 22, 2013 at 4:34 PM, Mike Blackwell <mike.blackwell@rrd.com> wrote:
> I believe the section you are reading refers to the BEGIN keyword in the
> procedural language plpgsql, not the SQL 'BEGIN' command.  The issue stems
> from confusing two distinct languages both of which, along with several more
> procedural languages, are documented in the same manual.

This is inherited constraint from Oracle pl/sql which pl/pgsql is, uh,
inspired by.  In pl/sql, all block opening constructs (THEN, LOOP,
BEGIN) do not get semi-colons.  BEGIN is a weird case because it's
(quite unfortunately) also the same thing that explicitly opens a
transaction in vanilla SQL; you use a semi-colon there as with any
standard SQL statement.

merlin



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: why semicolon after begin is not allowed in postgresql?
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: why semicolon after begin is not allowed in postgresql?