On Sat, Jul 17, 2004 at 12:20:27PM -0700, Jonathan M. Gardner wrote: > => CREATE TABLE t (i int); > > => CREATE OR REPLACE FUNCTION test() RETURNS VOID > LANGUAGE 'plpgsql' AS ' > BEGIN > INSERT INTO t VALUES (1); > EXECUTE ''BEGIN''; > DELETE FROM t; > EXECUTE ''ROLLBACK''; > RETURN; > END > '; > > => SELECT test(); > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed.
I described this behavior not less than two weeks ago, including why it happens. Try "begin; select test(); commit". The submitted savepoint patch prevents this from happening, and some other misbehaviors as well. -- Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) "I personally became interested in Linux while I was dating an English major who wouldn't know an operating system if it walked up and bit him." (Val Henson) ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])