pl/pgsql create table

From: Masse Jacques <jacques(dot)masse(at)bordeaux(dot)cemagref(dot)fr>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: pl/pgsql create table
Date: 2002-08-27 15:03:10
Message-ID: 0B87317EA62BD211A02A00A0C9DFB7EC9B5ECE@hermes.bordeaux.cemagref.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-08-27 15:05:20 Re: pl/pgsql create table
Previous Message Bruce Momjian 2002-08-27 14:51:27 Re: Measurement of databases & indexes