Re: pl/pgsql create table

From: Masse Jacques <jacques(dot)masse(at)bordeaux(dot)cemagref(dot)fr>
To: 'Bruce Momjian' <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pl/pgsql create table
Date: 2002-08-27 16:41:25
Message-ID: 0B87317EA62BD211A02A00A0C9DFB7EC9B5ED0@hermes.bordeaux.cemagref.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I find exactly the same with
EXECUTE ''CREATE TABLE tmp as select foo'';

___________________________________________
Jacques Massé
Tel. 33 (0)5 57 89 08 11 - Fax 33 (0)5 57 89 08 01

-----Message d'origine-----
De : Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
Envoyé : mardi 27 août 2002 16:05
À : Masse Jacques
Cc : pgsql-general
Objet : Re: [GENERAL] pl/pgsql create table

When referencing created/dropped tables in pl/pgsql, use EXECUTE to
prevent the table oid from being stored in function as precompiled. It
is mentioned in the current FAQ. The solution is for us to
automatically add EXECUTE somehow.

---------------------------------------------------------------------------

Masse Jacques wrote:
> I wonder when doing in a pg/pgsql function somewhat like
>
> CREATE TABLE tmp as select foo;
>
> I have an error when tmp don't exist ( "table tmp don't exist" ...)
>
> and all is working well when there is a table tmp (no matter the structure
> of this table, the new table has a structure according to foo)
>
> Id with
>
> DROP table tmp_site;
> CREATE table tmp_site as select foo;
>
> Cheers
> __________________________________________
> Jacques Mass?
> Tel. 33 (0)5 57 89 08 11 - Fax 33 (0)5 57 89 08 01
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dario Fumagalli 2002-08-27 16:45:19 Data files become huge fast
Previous Message Bruce Momjian 2002-08-27 16:39:10 Re: pl/pgsql create table