Re: BUG #14113: LIKE INCLUDING STORAGE bug? - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #14113: LIKE INCLUDING STORAGE bug?
Date
Msg-id CAKFQuwbWnsstGJNjKBLyDjemnZW7oT9ARKiZQaAPa13YXm7wuA@mail.gmail.com
Whole thread Raw
In response to BUG #14113: LIKE INCLUDING STORAGE bug?  (jdnelson@dyn.com)
List pgsql-bugs
On Monday, April 25, 2016, <jdnelson@dyn.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14113
> Logged by:          Jon Nelson
> Email address:      jdnelson@dyn.com <javascript:;>
> PostgreSQL version: 9.4.6
> Operating system:   Linux
> Description:
>
> Running 9.4.6 and 9.4.7, I think I have encountered a bug with INCLUDING
> STORAGE.
>
> The CREATE TABLE syntax with INCLUDING STORAGE would seem to suggest that
> storage options on the parent table (such as fillfactor) are copied to the
> new child table, but this doesn't appear to work:
>
> jnelson=# create table p (column1 integer not null) with (fillfactor = 70);
> CREATE TABLE
> jnelson=# \d+ p
>                            Table "public.p"
>  Column  |  Type   | Modifiers | Storage | Stats target | Description
> ---------+---------+-----------+---------+--------------+-------------
>  column1 | integer | not null  | plain   |              |
> Options: fillfactor=70
>
> jnelson=# create table c (like p including storage);
> CREATE TABLE
> jnelson=# \d+ c
>                            Table "public.c"
>  Column  |  Type   | Modifiers | Storage | Stats target | Description
> ---------+---------+-----------+---------+--------------+-------------
>  column1 | integer | not null  | plain   |              |
>
> jnelson=#
>
>
This is intended, though your confusion is understandable.

As noted explicitly in the inherits section, and repeatedly qualified
within like, the things being copied are columns and stuff related to
them.  Fillfactor is a table-scoped property and thus is not copied.

The relevant link in the like section directs the user to the chapter on
TOAST, which I believe is the only form of column storage customization
available to the DBA.

David J,

pgsql-bugs by date:

Previous
From: jdnelson@dyn.com
Date:
Subject: BUG #14113: LIKE INCLUDING STORAGE bug?
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #14110: information_schema.constraint_column_usage not working as expected