Re: [GENERAL] CREATE TABLE LIKE including all not including storageparameters? - Mailing list pgsql-general

From Achilleas Mantzios
Subject Re: [GENERAL] CREATE TABLE LIKE including all not including storageparameters?
Date
Msg-id 0cf062d6-7917-dba8-41c0-30e188f0ac88@matrix.gatewaynet.com
Whole thread Raw
In response to Re: [GENERAL] CREATE TABLE LIKE including all not including storage parameters?  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
On 05/09/2017 13:26, Michael Paquier wrote:
> On Tue, Sep 5, 2017 at 6:45 PM, Achilleas Mantzios
> <achill@matrix.gatewaynet.com> wrote:
>> Am I doing something wrong here?
I didn't sat that :) but you are right, STORAGE settings for copied col defs != tables's storage parameters. The key
hereis that LIKE deals with columns only, not other parameters of the table. 
>  From the documentation:
> https://www.postgresql.org/docs/devel/static/sql-createtable.html
> STORAGE settings for the copied column definitions will be copied only
> if INCLUDING STORAGE is specified. The default behavior is to exclude
> STORAGE settings, resulting in the copied columns in the new table
> having type-specific default settings. For more on STORAGE settings,
> see Section 66.2.
>
> And in this case storage parameters refer to column-specific settings,
> not table-level storage parameters, which are defined here by toast:
> https://www.postgresql.org/docs/devel/static/storage-toast.html


--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [GENERAL] CREATE TABLE LIKE including all not including storage parameters?
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Not possible to compare regrole in a view query?