pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Durham <ddurham@vailsys.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: create table like syntax
Date: Fri, 07 Oct 2005 09:48:12 -0500
Message-ID: <43468AAC.5010509@vailsys.com> (raw)
In-Reply-To: <20051006033636.GA12593@surnet.cl>
References: <4344942A.3040506@vailsys.com>
	<20051006033636.GA12593@surnet.cl>

Alvaro Herrera wrote:
> On Wed, Oct 05, 2005 at 10:04:10PM -0500, David Durham wrote:
> 
>>is there a syntax that would look something like:
>>
>>    create table newTable like oldTable without indexes || records || 
>>constraints with indexes || records || constraints
>>
>>built into postgres?
> 
> 
> What do you want to do with it?  If I understand what you want to do, it
> is supported as long as you use ; in place of your ||.


Well, I should say that the with and without should probably be mutually 
exclusive.  I don't know, haven't thought about it that much, but I find 
myself creating a lot of the same table over and over from time to time 
as I try to analyze some data.  Would be nice to say, hey, create a copy 
of this table with indexes and possibly records and constraints.  Or 
just a bare copy or something like that, but have a lot of different 
options for this kind of thing.


- Dave




view thread (4+ messages)

Message-ID: <43468AAC.5010509@vailsys.com>
Permalink:  ../43468AAC.5010509@vailsys.com/
Also on:    postgresql.org/message-id/43468AAC.5010509@vailsys.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ddurham@vailsys.com, alvherre@alvh.no-ip.org
  Subject: Re: create table like syntax
  In-Reply-To: <43468AAC.5010509@vailsys.com>
  References: <4344942A.3040506@vailsys.com> <20051006033636.GA12593@surnet.cl> <43468AAC.5010509@vailsys.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