Re: Bugs with like_option in CREATE TABLE

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Bugs with like_option in CREATE TABLE
Date: 2015-09-10 00:51:05
Message-ID: CAKFQuwZRuaYic27Wdj6PHj49C=+TNksW8ZhzpKp+iGiVUxPK8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 9, 2015 at 7:51 PM, Melvin Davidson <melvin6925(at)gmail(dot)com>
wrote:

>
>
>
> *O/S = Windows 10PostgreSQL 9.2.10, compiled by Visual C++ build 1600,
> 32-bit*
> http://www.postgresql.org/docs/9.1/interactive/sql-createtable.html
>
>
> and like_option is:
>
> { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS | INDEXES | STORAGE |
> COMMENTS | ALL }
>
> *1. INCLUDING CONSTRAINTS does not bring over the Foreign Keys*
>

​Not a bug since the documentation states that the only additional
constraints that are brought over are check constraints.​ Not Null
constraints are always brought over.

​"""
Not-null constraints are always copied to the new table. CHECK constraints
will only be copied if INCLUDING CONSTRAINTS is specified; other types of
constraints will never be copied. Also, no distinction is made between
column constraints and table constraints — when constraints are requested,
all check constraints are copied.
"""​

> *2. INCLUDING ALL does not work and generates an ERROR;*
>

​For kicks does writing it out in long form work?

"""
INCLUDING ALL is an abbreviated form of INCLUDING DEFAULTS INCLUDING
CONSTRAINTS INCLUDING INDEXES INCLUDING STORAGE INCLUDING COMMENTS.
"""

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-09-10 01:21:00 Re: Bugs with like_option in CREATE TABLE
Previous Message Melvin Davidson 2015-09-09 23:51:48 Bugs with like_option in CREATE TABLE