Re: Documentation bug: Chapter 35.4, paragraph 4

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jonathan Pool <pool(at)utilika(dot)org>, pgsql-bugs(at)postgresql(dot)org, Susan Colowick <smc(at)utilika(dot)org>
Subject: Re: Documentation bug: Chapter 35.4, paragraph 4
Date: 2011-03-10 23:50:56
Message-ID: 201103102350.p2ANouw26781@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs

Robert Haas wrote:
> On Tue, Nov 23, 2010 at 1:08 PM, Jonathan Pool <pool(at)utilika(dot)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 and defined as a function. Besides SELECT queries, the commands can include data modification queries (INSERT, UPDATE, and DELETE), as well as other SQL commands. (The only exception is that you cannot put BEGIN, COMMIT, ROLLBACK, or SAVEPOINT commands into a SQL function.)
> >
> > This appears to be incorrect, in that attempting to include a VACUUM command in a query-language function elicits the following error message:
> >
> > ERROR: ?VACUUM cannot be executed from a function or multi-command string
> >
> > 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.

I just made the wording more generic; we rarely are asked about this,
so generic seemed appropriate. Applied doc patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/doc.diff text/x-diff 1.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2011-03-11 00:40:28 Re: BUG #5765: pg_dump fail to find upper case table name
Previous Message Bruce Momjian 2011-03-10 21:08:29 Re: Problem with ALTER TABLE - occasional "tuple concurrently updated"

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2011-03-11 03:09:05 Re: explaining "context" column of pg_settings
Previous Message Thom Brown 2011-03-10 20:15:54 System functions doc page tidy-up