Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?

From: <david(at)andl(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do BEGIN/COMMIT/ABORT operate in a nested SPI query?
Date: 2016-04-18 10:57:53
Message-ID: 001301d19961$2bfcf2d0$83f6d870$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am attempting to create a new language implementation. The language is Andl (andl.org) so the handler is plandl.
This is a question about executing SPI queries from inside plandl.

The documentation makes it clear that SPI allows nested queries; that in some instances it will be necessary to call SPI_push() and SPI_pop(), but in others this will be handled automatically. Se http://www.postgresql.org/docs/9.5/interactive/spi-spi-push.html.

It is an important design feature of plandl to allow nested queries.

My question is: where are the transaction boundaries if the inner/outer query do or do not contain BEGIN/ABORT/COMMIT? Do they nest, or does an inner COMMIT finish a transaction started by an outer BEGIN, or is it ignored?

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message david 2016-04-18 11:34:03 Re: How to detoast a column of type BYTEAOID
Previous Message David Bennett 2016-04-18 10:46:15 Re: How to detoast a column of type BYTEAOID