pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David F. Skoll <dfs@roaringpenguin.com>
To: pgsql-admin@postgresql.org
Subject: CREATE TABLE LIKE and tablespaces
Date: Wed, 27 Feb 2013 13:29:35 -0500
Message-ID: <20130227132935.44fc25f1@hydrogen.roaringpenguin.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi,

I have an application that creates a daily table from a "prototype"
table, so something like:

CREATE TABLE data_20130226 LIKE data_prototype INCLUDING DEFAULTS INCLUDING CONSTRATINTS INCLUDING INDEXES;

It would be really nice to be able to add:

INCLUDING TABLESPACE

so that the daily table goes into the same table space as the prototype
table.  I can give a specific "TABLESPACE tablespace" clause, but then my
application needs to be aware that data_prototype is not in the default
tablespace.  Ideally, I'd like the admin to be able to move data_prototype
into an alternate tablespace and have all the daily tables be created
in that same tablespace.

I suppose similar comments apply to INHERITS.

Thoughts?

Regards,

David.



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)  latest in thread

Message-ID: <20130227132935.44fc25f1@hydrogen.roaringpenguin.com>
Permalink:  ../20130227132935.44fc25f1@hydrogen.roaringpenguin.com/
Also on:    postgresql.org/message-id/20130227132935.44fc25f1@hydrogen.roaringpenguin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: dfs@roaringpenguin.com
  Subject: Re: CREATE TABLE LIKE and tablespaces
  In-Reply-To: <20130227132935.44fc25f1@hydrogen.roaringpenguin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox