pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Erik Wienhold <ewie@ewie.name>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: rollback to savepoint issue
Date: Tue, 05 Sep 2023 09:19:40 -0400
Message-ID: <1314500.1693919980@sss.pgh.pa.us> (raw)
In-Reply-To: <202309051201.hnghlq3bit25@alvherre.pgsql>
References: <202309051201.hnghlq3bit25@alvherre.pgsql>

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> But it gets worse.  If you create a procedure (no longer a function)
> with a SAVEPOINT and ROLLBACK TO SAVEPOINT, it'll complain about the
> ROLLBACK TO command, but not about SAVEPOINT; and if you remove that,
> then it'll fail at runtime saying that SAVEPOINT is unsupported.

ROLLBACK in plpgsql is a different command with different syntax
options than the core grammar has.  So this is a matter of when
syntax errors are detected vs. when semantic errors are detected.

			regards, tom lane





view thread (10+ messages)

Message-ID: <1314500.1693919980@sss.pgh.pa.us>
Permalink:  ../1314500.1693919980@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1314500.1693919980@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, ewie@ewie.name, david.g.johnston@gmail.com
  Subject: Re: rollback to savepoint issue
  In-Reply-To: <1314500.1693919980@sss.pgh.pa.us>
  References: <202309051201.hnghlq3bit25@alvherre.pgsql> <1314500.1693919980@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox