Re: temp tables and sequences in functions - Mailing list pgsql-general

From A. Kretschmer
Subject Re: temp tables and sequences in functions
Date
Msg-id 20070905140544.GB19358@a-kretschmer.de
Whole thread Raw
In response to temp tables and sequences in functions  (Rob <motorhead9876@yahoo.com>)
List pgsql-general
am  Wed, dem 05.09.2007, um  6:58:30 -0700 mailte Rob folgendes:
> What is the proper why to deal with temp tables and sequences? Why aren't they
> being dropped after the function ends? Why do I get OID errors if I delete the
> temp table/sequence at the end of the function and then try to rerun the
> function?
>
> ERROR: could not open relation with OID 58341
> SQL state: XX000

normal behavior. Read more about this problem here:
http://merlinmoncure.blogspot.com/2007/09/as-previously-stated-postgresql-8.html

Solution: use EXECUTE for DDL-commands inside functions.


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

pgsql-general by date:

Previous
From: Rob
Date:
Subject: temp tables and sequences in functions
Next
From: SHARMILA JOTHIRAJAH
Date:
Subject: how to find the number of rows inserted into the master table?