From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | thiemo(at)gelassene-pferde(dot)biz, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Plans for partitioning of inheriting tables |
Date: | 2024-11-01 23:53:46 |
Message-ID: | 5466153d-3bc3-4553-a5b2-d4c5050fb1d5@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/1/24 16:10, thiemo(at)gelassene-pferde(dot)biz wrote:
>
> Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> escribió:
>
>> On 11/1/24 13:47, Thiemo Kellner wrote:
>>> It looks to me basically to be a "create table A as select * from B
>>> where false".
>>
>> No it more capable then that.
>
> Yes, I wrote basically, not exactly.
>
>> CREATE TABLE <some_tbl> LIKE <some_other_tbl> has like_option which
>> allows to transfer over more attributes of the table, for example
>> defaults, constraints, indexes, etc.
>
> But, to my understanding, no primary nor unique nor foreign constraint.
>
"INCLUDING INDEXES
Indexes, PRIMARY KEY, UNIQUE, and EXCLUDE constraints on the
original table will be created on the new table. Names for the new
indexes and constraints are chosen according to the default rules,
regardless of how the originals were named. (This behavior avoids
possible duplicate-name failures for the new indexes.)
"
FK's are not in the the INCLUDINGs, nor triggers.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Michel Pelletier | 2024-11-02 00:50:52 | Re: Using Expanded Objects other than Arrays from plpgsql |
Previous Message | thiemo | 2024-11-01 23:10:13 | Re: Plans for partitioning of inheriting tables |