Re: non intuitive behaviour of DROP TABLE IF EXISTS - Mailing list pgsql-general

From Bruce Momjian
Subject Re: non intuitive behaviour of DROP TABLE IF EXISTS
Date
Msg-id 201003070149.o271nUH10245@momjian.us
Whole thread Raw
In response to non intuitive behaviour of DROP TABLE IF EXISTS  (Manlio Perillo <manlio.perillo@gmail.com>)
Responses Re: non intuitive behaviour of DROP TABLE IF EXISTS  (Adrian von Bidder <avbidder@fortytwo.ch>)
List pgsql-general
Manlio Perillo wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi.
>
> I think the following behaviour is not intuitive:
>
> manlio=> DROP TABLE IF EXISTS foo.bar;
> ERROR:  schema "foo" does not exist
>
> The statement should not fail if the schema does not exist

Hmm.  Well, it says TABLE IF EXISTS, not TABLE AND SCHEMA IF EXISTS.
;-)

Not sure if it makes sense to change it.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?
Next
From: Bruce Momjian
Date:
Subject: Re: XML performance tuning