Re: [GENERAL] Temp Table Within PLPGSQL Function - Something Awry

2007-01-16 Thread Chad Wagner
It appears that what is happening is PL/pgSQL is caching the table definition (it appears to do this on first execution), testing it with dynamic SQL via the EXECUTE clause doesn't exhibit the same issue: CREATE OR REPLACE FUNCTION test_fxn() RETURNS SETOF RECORD AS $$ DECLARE test_rec RECORD;

Re: [GENERAL] Temp Table Within PLPGSQL Function - Something Awry

2007-01-16 Thread Alan Hodgson
On Tuesday 16 January 2007 10:10, "Lenorovitz, Joel" <[EMAIL PROTECTED]> wrote: > Greetings, > > I am trying to work with a TEMP TABLE within a plpgsql function and I > was wondering if anyone can explain why the function below, which is > fine syntactically, will work as expected the first time i

Re: [GENERAL] Temp Table Within PLPGSQL Function - Something Awry

2007-01-16 Thread Martijn van Oosterhout
On Tue, Jan 16, 2007 at 11:10:25AM -0700, Lenorovitz, Joel wrote: > Greetings, > > I am trying to work with a TEMP TABLE within a plpgsql function and I > was wondering if anyone can explain why the function below, which is > fine syntactically, will work as expected the first time it is called, >