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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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