Skip site navigation (1) Skip section navigation (2)

Re: CREATE SCHEMA IF NOT EXISTS

From: Volker Grabsch <vog(at)notjusthosting(dot)com>
To: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
Cc: fabriziomello(at)gmail(dot)com, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>,david(at)justatheory(dot)com
Subject: Re: CREATE SCHEMA IF NOT EXISTS
Date: 2012-09-29 09:32:13
Message-ID: 20120929093213.GE16144@vlap (view raw or flat)
Thread:
Lists: pgsql-hackers
Dickson S. Guedes schrieb:
> - 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.
>
> [...]
>
> - Should this patch implements others INEs like ADD COLUMN IF NOT EXISTS?

If there's still a chance to improve the patch, I'd love to see
the following INEs implemented. Several real-world database
upgrade scripts would benefit from those:

1)
CREATE [ TEMPORARY | TEMP ] SEQUENCE [ IF NOT EXISTS ] name ...

2)
ALTER TABLE ... ADD [ COLUMN ] [ IF NOT EXISTS ] column_name ...

3)
CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ IF NOT EXISTS ] [ name ] ON ...


Regards,
Volker

-- 
Volker Grabsch
---<<(())>>---


In response to

Responses

pgsql-hackers by date

Next:From: Dariel Nicolas De Jesus MedrnaoDate: 2012-09-29 12:53:31
Subject: Installation of xpath (read xml on postgres)
Previous:From: Misa SimicDate: 2012-09-29 07:49:56
Subject: Re: data to json enhancements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group