Search Postgresql Archives

Re: Per-session data?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 03, 2004 at 02:18:28PM -0400, Mike Mascari wrote:
> I wrote:
> 
> >There are three problems with using PostgreSQL temporary tables:
> >
> >1. PL/pgSQL will cache the OID of the temporary table that existed when 
> >it is first parsed, and when that temporary table is dropped and 
> >recreated later, despite having the same name and structure, you'll get 
> >an error like:
> >
> >ERROR:  relation with OID 869140 does not exist
> >CONTEXT:  PL/pgSQL function "mytest" line 4 at select into variables
> >
> >The work-around is to use EXECUTE to build the query string at run-time.
> 
> I should point out that if you ensure that you create the temporary 
> table before invoking the function, the function gets parsed once 
> after the first invocation at the beginning of the session. So that, 
> in that instance, it would be okay.

OK, sounds like that'll work nicely for the particular application I'm
working on. Thanks.

Cheers,
  Steve


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux