Received: from astercity.net (pawel@astercity.net [195.116.8.78]) by hub.org (8.9.1/8.9.1) with ESMTP id JAA18572 for ; Wed, 6 Jan 1999 09:53:44 -0500 (EST) (envelope-from pawel@astercity.net) Received: from localhost (pawel@localhost) by astercity.net (8.8.7/8.8.7) with ESMTP id PAA11020; Wed, 6 Jan 1999 15:43:56 +0100 Date: Wed, 6 Jan 1999 15:43:55 +0100 (EET) From: Pawel Pierscionek To: Jan Wieck cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] drop table in pgsql In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 6 Jan 1999, Jan Wieck wrote: > > > > Hi, > > > > How do I drop a table under plpgsql ? > > When I invoke a function which contains eg: DROP TABLE TMP a get a > > backend crash no matter if this table exists or not. > > > > I can always do it the hard way and put DROP ... in an SQL function > > and then invoke DROP indirectly but do I have to ? > > > > Please help me > > Pawel Pierscionek > > Huh - intersting. Not that I think it's good to change the > database schema from inside of functions, but if SQL > functions can do it, PL/pgSQL should too. Will take a look at > it. > I don't like changing db shema that way too, but there is no support for temporary tables and I have to use drop before I go with select sth into temp_db. Pawel Pierscionek