Re: Documentation bug: Chapter 35.4, paragraph 4

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Documentation bug: Chapter 35.4, paragraph 4
Дата
Msg-id AANLkTi=ieF0EjDD4E2X=_8DZcc82kwyobduC19u8f3pf@mail.gmail.com
обсуждение исходный текст
Ответ на Documentation bug: Chapter 35.4, paragraph 4  (Jonathan Pool <pool@utilika.org>)
Ответы Re: Documentation bug: Chapter 35.4, paragraph 4  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
On Tue, Nov 23, 2010 at 1:08 PM, Jonathan Pool <pool@utilika.org> wrote:
> Chapter 35.4, paragraph 4, of the PostgreSQL 9.0.1 Documentation says:
>
> Any collection of commands in the SQL language can be packaged together a=
nd defined as a function. Besides SELECT queries, the commands can include =
data modification queries (INSERT, UPDATE, and DELETE), as well as other SQ=
L commands. (The only exception is that you cannot put BEGIN, COMMIT, ROLLB=
ACK, or SAVEPOINT commands into a SQL function.)
>
> This appears to be incorrect, in that attempting to include a VACUUM comm=
and in a query-language function elicits the following error message:
>
> ERROR: =A0VACUUM cannot be executed from a function or multi-command stri=
ng
>
> Thus, presumably "VACUUM" should be added to the list of exceptions.

I fear it's worse than that.  Taking a look at the places where we
call PreventTransactionChain(), they appear to include database-wide
CLUSTER, DISCARD ALL, VACUUM (as you noted), COMMIT PREPARED, ROLLBACK
PREPARED, CREATE TABLESPACE, DROP TABLESPACE, ALTER TYPE <enum> ADD
VALUE <label> (but the PreventTransactionChain call says ADD rather
than ADD VALUE), CREATE INDEX CONCURRENTLY, CREATE DATABASE, DROP
DATABASE, and REINDEX DATABASE.

I'm not sure if there's some generic way we could refer to all that
rather than listing them all individually.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5763: pg_hba.conf not honored
Следующее
От: "Bala Murugan"
Дата:
Сообщение: BUG #5774: VACCUM & REINDEX kills production environement