Re: Document that PG_TRY block cannot have a return statement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Serpent <serpent7776(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Document that PG_TRY block cannot have a return statement
Date: 2023-09-12 14:29:26
Message-ID: 2796288.1694528966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Serpent <serpent7776(at)gmail(dot)com> writes:
> I created a tiny patch that documents that the code block following
> PG_TRY() cannot have any return statement.

AFAIK, this is wrong. The actual requirement is already stated
in the comment:

* ... The error recovery code
* can either do PG_RE_THROW to propagate the error outwards, or do a
* (sub)transaction abort.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-09-12 14:40:22 Re: Adding a pg_get_owned_sequence function?
Previous Message Alexander Kukushkin 2023-09-12 13:29:46 Re: pg_rewind WAL segments deletion pitfall