Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.1/8.9.1) with SMTP id FAA26206 for ; Wed, 6 Jan 1999 05:09:22 -0500 (EST) (envelope-from wieck@sapserv.debis.de) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m0zxq3u-000EBRC; Wed, 6 Jan 99 11:19 MET Message-Id: From: jwieck@debis.com (Jan Wieck) Subject: Re: [SQL] drop table in pgsql To: pawel@astercity.net Date: Wed, 6 Jan 1999 11:19:38 +0100 (MET) Cc: pgsql-sql@postgreSQL.org Reply-To: jwieck@debis.com (Jan Wieck) In-Reply-To: <15931.990105@astercity.net> from "Pawel Pierscionek" at Jan 5, 99 10:20:50 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > 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. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #======================================== jwieck@debis.com (Jan Wieck) #