RE: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...' - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...'
Date
Msg-id 000601bf8322$adff9c40$2801007e@tpf.co.jp
Whole thread Raw
In response to Bug report for 7.0beta1 in 'CREATE FUNCTION...'  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...'  (Bruce Momjian <pgman@candle.pha.pa.us>)
RE: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
RE: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...'  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
List pgsql-hackers
> -----Original Message-----
> From: owner-pgsql-hackers@postgresql.org
> [mailto:owner-pgsql-hackers@postgresql.org]On Behalf Of The Hermit
> Hacker
> 
> 
> Can someone look into this, and followup with Don? :)
>

Currently utility commands aren't executable in PL/pgSQL.
In short,it's due the lack of implementation of copyObject()
for UtilityStatements.
However,there's another essential problem.

PL/pgSQL caches prepared plans for fucntions at their
first execution time. Though many oids/numbers ... exist
in the cached plans,they are changed by DML statements
and cached plans would become invalid. Currently once
a plan is cached,it stays in TopMemoryContext forever
and would never be removed/changed.

Jan could give more precise comments on this topic.

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp
> ====================
> From: Don Baccus <dhogaza@pacifier.com>
> 
> Slightly less minor bug.  Forward this to the right place, too.
> 
> acs=# create function foo() returns integer as '
> acs'# begin
> acs'# create table bar(i integer);
> acs'# return 1;
> acs'# end;' language 'plpgsql';
> CREATE
> acs=# select foo();
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
> !# 
> 
> 
> DML statements apparently aren't meant to be supported in plpgsql,
> since any I try crash.  This, again, is PG7.0 beta.
> =====================
> 
> 
> 
> Marc G. Fournier                   ICQ#7615664               IRC 
> Nick: Scrappy
> Systems Administrator @ hub.org 
> primary: scrappy@hub.org           secondary: 
> scrappy@{freebsd|postgresql}.org 
> 
> 
> ************
> 


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Cache query implemented
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Bug report for 7.0beta1 in 'CREATE FUNCTION...'