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

From Dickson S. Guedes
Subject Re: CREATE SCHEMA IF NOT EXISTS
Date
Msg-id CAHHcreqw-r+=xTh2+T6XpxiO-SAvZgq7aWSQJ99BPkJt6Vx59Q@mail.gmail.com
Whole thread Raw
In response to Re: CREATE SCHEMA IF NOT EXISTS  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: CREATE SCHEMA IF NOT EXISTS
Re: CREATE SCHEMA IF NOT EXISTS
Re: CREATE SCHEMA IF NOT EXISTS
Re: CREATE SCHEMA IF NOT EXISTS
List pgsql-hackers
Hello,

I reviewed this v5 of patch:

- https://commitfest.postgresql.org/action/patch_view?id=907

The patch is small and implements a new syntax to CREATE SCHEMA
that allow the creation of a schema be skipped when IF NOT EXISTS is
used.

It was applied to 483c2c1071c45e275782d33d646c3018f02f9f94 with
two hunks offset, was compiled without errors or new warnings and
pass all tests, even the tests that covers the expected results for it
self.

The docs was updated with the information about the expected behavior.

I tested against ambiguity, i. e. creating a schema with name 'if' and got the
expected results when try to create it if not exists.

Two questions:

- Should this patch implements others INEs like ADD COLUMN IF NOT EXISTS?
- Should pg_dump or pg_restore support some kind of flag to use a
  CREATE SCHEMA IF NOT EXISTS ... instead CREATE SCHEMA ...?

Regards,
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net -
skype/twitter: guediz ~ github.com/guedes
http://guedesoft.net ~ http://www.postgresql.org.br

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: FATAL: bogus data in lock file "postmaster.pid": ""
Next
From: Bruce Momjian
Date:
Subject: Re: FATAL: bogus data in lock file "postmaster.pid": ""