public inbox for [email protected]  
help / color / mirror / Atom feed
From: Thiemo Kellner <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Plans for partitioning of inheriting tables
Date: Sat, 2 Nov 2024 08:13:34 +0100 (GMT+01:00)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<20241101094106.Horde.TwPSs9YUgJ5v-_M-4ltwoeh@webmail.gelassene-pferde.biz>
	<[email protected]>
	<20241101182110.Horde.P_w6KptTjJNeM1X9Asg5bE3@webmail.gelassene-pferde.biz>
	<[email protected]>
	<CAKkG4_nV-+6rz-01pA-S5vD7ai2h_ujF1cDFoOBG10CCHgRfmg@mail.gmail.com>
	<20241101201600.Horde.Br4fPP8BFAAwzFoMaM8_eJS@webmail.gelassene-pferde.biz>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<20241102001013.Horde.g70bTplHNWnh_M3vk9I-edj@webmail.gelassene-pferde.biz>
	<[email protected]>

My bad. I was expecting primary and unique to be mentioned here, so I did not read on.


**INCLUDING CONSTRAINTS*** **#[https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-LIKE-OPT-CONSTRAI...]*

/*CHECK*// constraints will be copied. No distinction is made between column constraints and table constraints. Not-null constraints are always copied to the new table./


02.11.2024 00:53:53 Adrian Klaver <[email protected]>:

> On 11/1/24 16:10, [email protected] wrote:
>> Adrian Klaver <[email protected]> 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
> [email protected]






view thread (13+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Plans for partitioning of inheriting tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox