Copy storage parameters on CREATE TABLE LIKE/INHERITS

Поиск
Список
Период
Сортировка
Искать
От
ITAGAKI Takahiro
Тема
Copy storage parameters on CREATE TABLE LIKE/INHERITS
Дата
Msg-id
20080730162919.714F.52131E4D@oss.ntt.co.jp
Список
Дерево обсуждения
Copy storage parameters on CREATE TABLE LIKE/INHERITS ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS daveg <daveg@sonic.net>
Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS Tom Lane <tgl@sss.pgh.pa.us>
Re: Copy storage parameters on CREATE TABLE LIKE/INHERITS ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
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.


Basically, this patch does nothing if the base tables have only 
default settings, but there is an exception -- WITH OIDS. In 8.3,
we inherits WITH OIDS configuration on INHERITS, but not on LIKE.
I'd like to modify the behavior to inherit OIDS configuration
because inheritance would be expected in various contexts.
I did so in the patch, in that a new table will have OIDS if
at least one of its template tables in LIKE has OIDS.

Comments welcome.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
В списке pgsql-hackers по дате отправления
От: Ryan Bradetich
Дата:
От: Abhijit Menon-Sen
Дата:
FAQ