Re: [RFC] Add an until-0 loop in psql

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Corey Huinker" <corey(dot)huinker(at)gmail(dot)com>
Cc: pierre(dot)ducroquet(at)people-doc(dot)com,pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] Add an until-0 loop in psql
Date: 2018-04-30 11:01:25
Message-ID: 29c2996c-ad55-42a7-bafe-79dc9d26add9@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierre Ducroquet 2018-04-30 11:05:36 Re: [RFC] Add an until-0 loop in psql
Previous Message Andrey Borodin 2018-04-30 10:39:08 Re: [HACKERS] Clock with Adaptive Replacement