Re: CREATE SCHEMA IF NOT EXISTS

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Dickson S. Guedes <listas@guedesoft.net>
Cc: fabriziomello <fabriziomello@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, david <david@justatheory.com>
Date: 2012-10-02T19:08:16Z
Lists: pgsql-hackers
The fundamental issue with this patch hasn't been answered sufficiently,
I think.  Consider the following sequence of commands:

create schema if not exists foo create table first (a int);
create schema if not exists foo create table second (a int);


As far as I can see, with the patch as it currently stands, you would
end up with only table "first" in the schema, which seems very
surprising to me.

I think this needs more thought, and in any case it needs more
comprehensive regression test and documentation (i.e. at least the
examples ought to explain what would happen in such cases).

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Document the lack of reading the PGDATABASE environment variable in