Re: non intuitive behaviour of DROP TABLE IF EXISTS

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Manlio Perillo <manlio(dot)perillo(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: non intuitive behaviour of DROP TABLE IF EXISTS
Date: 2010-03-07 01:49:29
Message-ID: 201003070149.o271nUH10245@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2010-03-07 02:47:36 Re: XML performance tuning
Previous Message Tom Lane 2010-03-07 01:13:04 Re: What's the best way to deal with the pk_seq sequence value after a restore (bulk loading)?