From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Joris Dobbelsteen <joris(at)familiedobbelsteen(dot)nl> |
Cc: | wstrzalka <wstrzalka(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Feature request/suggestion - CREATE SCHEMA LIKE |
Date: | 2008-03-18 14:57:20 |
Message-ID: | 200803181457.m2IEvKq18988@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joris Dobbelsteen wrote:
> wstrzalka wrote:
> > Hi
> >
> > Features like CREATE DATABASE WITH TEMPLATE or CREATE TABLE LIKE
> > are very usefull but it would be great to have such a feature on the
> > mid-level too. I mean something CREATE SCHEMA LIKE that would copy all
> > the template schema relations, etc...
> > What do you think about it ? Would it be hard to implement ? Is it
> > worth the effort
> I believe the CREATE DATABASE was because of the way postgresql creates
> a database. I thought it just copied the template database (but are not
> completely sure). I also believe CREATE TABLE LIKE was mostly for
> temporary tables, where the query can not be sure what the table
> actually looks like when it is invoked.
>
> Would it not be possible to work around the SCHEMA LIKE by just dumping
> the database schema and restoring it to a new schema? This seems more
> like a part that should be under strict user control and not automated
> by common queries.
No one has actually asked for CREATE SCHEMA LIKE before but we could add
it to the TODO list if we can find a few people who want the feature.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Gordon | 2008-03-18 15:18:01 | Cast character to boolean |
Previous Message | Vivek Khera | 2008-03-18 14:36:28 | Re: Problem with async notifications of table updates |