Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Problems w/ Temp Tables



am  Tue, dem 23.01.2007, um 10:51:51 -0600 mailte brian stapel folgendes:
> 4.19) Why do I get "relation with OID ##### does not exist" errors when
> accessing temporary tables in PL/PgSQL functions?
> 
> PL/PgSQL caches function scripts, and an unfortunate side effect is that if a
> PL/PgSQL function accesses a temporary table, and that table is later dropped
> and recreated, and the function called again, the function will fail because
> the cached function contents still point to the old temporary table. The
> solution is to use EXECUTE for temporary table access in PL/PgSQL. This will
> cause the query to be reparsed every time.
> 
>  
> 
> Can you tell me where should I implement the EXECUTE commands - in my function
> or with in my vba code?  My vba code typically uses - SELECT * from {function

in your function.

sql = 'SELECT * from ...';
EXECUTE sql;



Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group