Re: [SQL] drop table in pgsql - Mailing list pgsql-sql

From jwieck@debis.com (Jan Wieck)
Subject Re: [SQL] drop table in pgsql
Date
Msg-id m0zxq3u-000EBRC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to drop table in pgsql  (Pawel Pierscionek <pawel@astercity.net>)
Responses Re: [SQL] drop table in pgsql  (Pawel Pierscionek <pawel@astercity.net>)
PL/pgSQL / SPI and UTILITY statements  (jwieck@debis.com (Jan Wieck))
List pgsql-sql
>
> 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) #

pgsql-sql by date:

Previous
From: Pawel Pierscionek
Date:
Subject: plpgsql problems
Next
From: "Tim Perdue"
Date:
Subject: Importing Fixed-Width File?