Re: NOTIFY in multi-statement PQexec() not sent outside of transaction

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: John Muehlhausen <jgm(at)jgm(dot)org>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: NOTIFY in multi-statement PQexec() not sent outside of transaction
Date: 2020-04-20 18:26:44
Message-ID: CAKFQuwb4OS74dBshrvB9Zu9V5ik5W2+5ja-tD0ieEK7LwZKWRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Monday, April 20, 2020, John Muehlhausen <jgm(at)jgm(dot)org> wrote:

>
> # docs seem to indicate that an implied transaction
> # will not exist if there is an explicit begin/commit?
> cur.execute(("notify __test; "
> "begin; select pg_advisory_lock(7777); "
> "select pg_advisory_unlock(7777); commit"))
>
>
A more comprehensive reading of the docs finds:

“ If the BEGIN follows some statements that were executed as an implicit
transaction block, those statements are not immediately committed; in
effect, they are retroactively included into the new regular transaction
block. “.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-04-20 18:48:00 Re: BUG #16378: Invalid memory access on interrupting CLUSTER after CREATE TEMP TABLE
Previous Message Roman Peshkurov 2020-04-20 17:40:06 Bug with memory leak on cert validation in libpq