Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t71Sp-00H2zl-11 for pgsql-general@arkaria.postgresql.org; Fri, 01 Nov 2024 23:53:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t71Sm-001Zx2-HQ for pgsql-general@arkaria.postgresql.org; Fri, 01 Nov 2024 23:53:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t71Sl-001Zwt-2C for pgsql-general@lists.postgresql.org; Fri, 01 Nov 2024 23:53:56 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t71Sh-004GiT-NP for pgsql-general@lists.postgresql.org; Fri, 01 Nov 2024 23:53:54 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 7D34011400F8; Fri, 1 Nov 2024 19:53:48 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 01 Nov 2024 19:53:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1730505228; x=1730591628; bh=dpx8TSs+Yw/ipHrYFkkHVitjZ5SEZgAdqu1SaTozwUU=; b= v6joyEtqnTd8flCWsbrn399YiOrxuk0KYAB5rtwWHiyx1iM0P/zbxOmwR3pNY8MF kItOIXVz8noc8N27gFgAVAX5DyirWNOPIunXnGiEQGELcDj8JPocwsaZ2+RLfSeI g6HVeuL9zZIPVL/+2GXGvTgGCsFsTlctwkP3KZWCgY/m2xiKqXWBmRbH7SZduEVw 6nYbjRfOq1oGwmJkFT5u14l86vzCEo+DbaR2IYZTCF1lSapQAHnbFYq7bJAlTLy4 E8nyGX+8dTvwj+3pq1mNNOcj6Md9VNWgM0P5H5H008mdYzhaAtD/oYvbfv9fkJxp A94cctPPNAvCdduwfUoDJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730505228; x=1730591628; bh=d px8TSs+Yw/ipHrYFkkHVitjZ5SEZgAdqu1SaTozwUU=; b=PKI5xDBWVeZcXimpa gm5gVdhkG1uOxaxxrDZ8oH5nLIMG8uO7io4a65b6z+JFWLfMRvxXirs9sQh0VChZ hgtpJuwnif2l6rABeuBGvxKX9Aqwu7grnGFYSdNJSB6F7bd9UEiT1NQcmd6RcN7B O4OTpw/jAgicIcUoFQuOwCk3FDhNrYBtwBeYAK5ALxrpY5USEaX3wORNySUGDPVq 7r7Qjf9JMXTaMvw78BaOLkwqS9gvrkQOdMJXSBCcEeNYDqBagWIofV7iIHgbczbJ +MI/e5Kt9THHUoRycvhMHbF5Vt//odZ84qwRTNEt2FKTFsgeUPk62sGstydiP7kH VMQiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeltddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeffleegieefgfevudehtdfh keeutdffjeevgeffgeejvedthefgudeiteefheejheenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehthhhivghmohesghgvlhgrshhsvghnvgdqphhfvghruggvrdgsihiipdhr tghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Nov 2024 19:53:47 -0400 (EDT) Message-ID: <5466153d-3bc3-4553-a5b2-d4c5050fb1d5@aklaver.com> Date: Fri, 1 Nov 2024 16:53:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Plans for partitioning of inheriting tables To: thiemo@gelassene-pferde.biz, PostgreSQL General References: <5757acdc-39ed-4642-a449-26e47b1bcf95@gelassene-pferde.biz> <20241101094106.Horde.TwPSs9YUgJ5v-_M-4ltwoeh@webmail.gelassene-pferde.biz> <14c1eb8c-a853-43b3-a1ea-b105bfd6c99b@aklaver.com> <20241101182110.Horde.P_w6KptTjJNeM1X9Asg5bE3@webmail.gelassene-pferde.biz> <6bc57377-52e1-496a-b9d6-4cd9dc84d92e@aklaver.com> <20241101201600.Horde.Br4fPP8BFAAwzFoMaM8_eJS@webmail.gelassene-pferde.biz> <666c82fe-be27-4f32-99ad-8952a56f2282@aklaver.com> <8791c3bf-6fff-4db4-a29e-2679d2de0960@gelassene-pferde.biz> <20241102001013.Horde.g70bTplHNWnh_M3vk9I-edj@webmail.gelassene-pferde.biz> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20241102001013.Horde.g70bTplHNWnh_M3vk9I-edj@webmail.gelassene-pferde.biz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/1/24 16:10, thiemo@gelassene-pferde.biz wrote: > > Adrian Klaver 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 LIKE 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.klaver@aklaver.com