Copy column storage parameters on CREATE TABLE LIKE/INHERITS

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Copy column storage parameters on CREATE TABLE LIKE/INHERITS
Дата
Msg-id 20080812170932.8E65.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответы [Patch Review] Copy column storage parameters on CREATE TABLE LIKE/INHERITS  (Stephen Frost <sfrost@snowman.net>)
Re: Copy column storage parameters on CREATE TABLE LIKE/INHERITS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Here is an updated version of the "Copy storage parameters" patch.
http://archives.postgresql.org/pgsql-hackers/2008-07/msg01417.php

This patch copies only column storage parameters and does not copy
reloptions as a result of the discussion, in which reloptions should
not be copied because LIKE and INHERITS are not table definitions,
but column definitions.

Copying reloptions (or copying just table's definition) might be useful
in some cases, but it should be done by another independent patch.


Inheriting column storage parameters is useful if we duplicate an
existing table. CREATE TABLE AS is useful to avoid WALs in that time:

  CREATE TABLE (LIKE target) WITH (<same as the target table>)
    AS SELECT * FROM target;

However, we cannot execute ALTER COLUMN SET STORAGE after creating the
new table and before inserting, because there are no time to execute
commands between them. So we need some methods to set column storage
parameters at creating a table.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: WIP: New Page API
Следующее
От: Gregory Stark
Дата:
Сообщение: psql bug -- using old variables and database connection