Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS - Mailing list pgsql-hackers

From daveg
Subject Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS
Date
Msg-id 20080730203852.GC29152@sonic.net
Whole thread Raw
In response to Copy storage parameters on CREATE TABLE LIKE/INHERITS  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jul 30, 2008 at 04:45:47PM +0900, ITAGAKI Takahiro wrote:
> Here is a patch to copy column storage parameters and reloptions on
> CREATE TABLE LIKE, which I proposed at:
>   [HACKERS] Uncopied parameters on CREATE TABLE LIKE
>   http://archives.postgresql.org/message-id/20080724145954.E572.52131E4D@oss.ntt.co.jp
> 
> Column storage parameters (by ALTER COLUMN SET STORAGE) and table
> storage parameters (by ALTER TABLE SET (...) ) are copied from template
> tables on LIKE or parent tables on INHERITS (1. and 2. at above e-mail).
> The patch does not include copying of comments (3.) for now.
> It also includes new regression tests and rough documentation.
> 
> When template or parent tables have non-default settings,
> they are copied into a new table automatically on CREATE TABLE.
> If CREATE TABLE statement has own storage parameter definition,
> they overwrites inherited settings.

I'd like to have the ability to copy these parameters, but not to have it
be automatic. Some of my clients applications commonly use CREATE TABLE
LIKE to get empty work tables to populate and update before adding the
data to the main table (which may have non-default settings). The automatic
behaviour may be undesirable for this use.

-dg

-- 
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Type Categories for User-Defined Types
Next
From: Gregory Stark
Date:
Subject: Re: Should creating a new base type require superuser status?