Re: CREATE SCHEMA IF NOT EXISTS - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: CREATE SCHEMA IF NOT EXISTS
Date
Msg-id 59BF1E0D-ECB6-45DA-8020-EBB9CF605BF3@justatheory.com
Whole thread Raw
In response to Re: CREATE SCHEMA IF NOT EXISTS  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: CREATE SCHEMA IF NOT EXISTS  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Oct 2, 2012, at 12:30 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> How about call this for precedent:
> 
> mkdir -p /tmp/foo/bar
> mkdir -p /tmp/foo/baz
> 
> In this case you end up with directory "foo" and at least two subdirs in
> it, bar and baz.  This works even if /tmp/foo existed previously and
> even if there was some other stuff in it.

Well, what about this, then?

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

David




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: CREATE SCHEMA IF NOT EXISTS
Next
From: Tom Lane
Date:
Subject: Re: CREATE SCHEMA IF NOT EXISTS