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

Re: CREATE TABLE LIKE INCLUDING INDEXES support

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: "Tatsuo Ishii" <ishii(at)sraoss(dot)co(dot)jp>, <neilc(at)samurai(dot)com>, <nikkhils(at)gmail(dot)com>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <bruce(at)momjian(dot)us>, <chizu(at)spicious(dot)com>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CREATE TABLE LIKE INCLUDING INDEXES support
Date: 2007-07-21 09:54:17
Message-ID: 87lkda6q0m.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Jim C. Nasby" <decibel(at)decibel(dot)org> writes:

> On Fri, Jul 20, 2007 at 12:40:46PM +0100, Gregory Stark wrote:
>
>> One of the main use cases I envision is wanting to create new partitions
>> suitable for being added to a partitioned table.
>
> Except that's normally done with CREATE TABLE INHERITS, which seems
> cleaner to me. I think the patch would be more useful if it added
> support for INHERITS, but I don't object to it as-is.

Well there are two different approaches to creating a new partition. For some
use cases you want to create a new empty partition directly in the table and
start using it right away. For other use cases you want to create a table into
which you need to load data, possibly even massage the data with updates and
deletes or additional inserts, then add the partition with the data all ready
directly into the master table.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


In response to

pgsql-hackers by date

Next:From: Simon RiggsDate: 2007-07-21 11:20:24
Subject: Re: Updated bitmap index patch
Previous:From: Heikki LinnakangasDate: 2007-07-21 08:05:01
Subject: Re: Memory leak in vac_update_relstats ?

pgsql-patches by date

Next:From: Simon RiggsDate: 2007-07-21 11:20:24
Subject: Re: Updated bitmap index patch
Previous:From: Jim C. NasbyDate: 2007-07-20 21:01:29
Subject: Re: CREATE TABLE LIKE INCLUDING INDEXES support

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