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

2016-04-20 Thread david
> >> Define "executes". You could shove those lines in via the wire > >> protocol, sure, but SPI won't take them. > > > Now you really have me puzzled. What I provided is an extract from the > > log of generated SQL commands sent to the SPI interface. [Obviously > > there also values bound to

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

2016-04-20 Thread Tom Lane
writes: > From: Tom Lane [mailto:t...@sss.pgh.pa.us] >> Define "executes". You could shove those lines in via the wire protocol, >> sure, but SPI won't take them. > Now you really have me puzzled. What I provided is an extract from the log > of generated SQL commands sent to the

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

2016-04-20 Thread Tom Lane
writes: >> From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] >> Since there are no autonomous transactions in PostgreSQL, how can you have >> BEGIN and COMMIT called from the code that is invoked by "SELECT >> my_andl_function()"? > I really don't know. But I have code that

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

2016-04-20 Thread david
> From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] > > > > 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

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

2016-04-20 Thread Albe Laurenz
David Bennett wrote: > > From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] > > > > > 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

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

2016-04-19 Thread David Bennett
> From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] > > > 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

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

2016-04-18 Thread John R Pierce
On 4/18/2016 5:41 PM, da...@andl.org wrote: Are you sure you meant it like that? I already have BEGIN/COMMIT inside a function and it works perfectly. If it did not, then it would be impossible to use BEGIN/COMMIT in any language handler, since every call to a language handler is a call to a

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

2016-04-18 Thread david
> From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] > > > 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

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

2016-04-18 Thread Albe Laurenz
da...@andl.org wrote: > 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

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

2016-04-18 Thread david
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