Re: [RFC] Add an until-0 loop in psql - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: [RFC] Add an until-0 loop in psql
Date
Msg-id 29c2996c-ad55-42a7-bafe-79dc9d26add9@manitou-mail.org
Whole thread Raw
In response to Re: [RFC] Add an until-0 loop in psql  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: [RFC] Add an until-0 loop in psql  (Pierre Ducroquet <pierre.ducroquet@people-doc.com>)
Re: [RFC] Add an until-0 loop in psql  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
    Corey Huinker wrote:

> As of v11, DO blocks can do transactions. I think this will meet your needs.

They do support COMMIT and ROLLBACK in the current
development tree, but not VACUUM as in Pierre's example.

postgres=# \echo :SERVER_VERSION_NAME
11devel

postgres=# do ' begin vacuum; end ';
ERROR:    VACUUM cannot be executed from a function
CONTEXT:  SQL statement "vacuum"
PL/pgSQL function inline_code_block line 1 at SQL statement


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: [HACKERS] Clock with Adaptive Replacement
Next
From: Pierre Ducroquet
Date:
Subject: Re: [RFC] Add an until-0 loop in psql