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 1teCU5-00CQsl-LD for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Feb 2025 12:20:26 +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 1teCU3-0056DF-NO for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Feb 2025 12:20:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1teCU3-0056CZ-03 for pgsql-hackers@lists.postgresql.org; Sat, 01 Feb 2025 12:20:23 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1teCU0-002coT-13 for pgsql-hackers@lists.postgresql.org; Sat, 01 Feb 2025 12:20:21 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id 2A05E11400BF; Sat, 1 Feb 2025 07:20:19 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Sat, 01 Feb 2025 07:20:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1738412419; x=1738498819; bh=d o+j4BpenGwqyU4ZkDABUOGaZEEbEbdTfUnkL1mYvOo=; b=jLgzH+YSP6BwTrxFm TzV+7rSGXuz3ZqtYU28kyWyaDfVcO3AThnBQGyUqi3RBobHgVjg3bxwtIT11z0t1 9aQ77Gz5EF4WlnndSa2mXlT8hC4iBjGRo73FnDJi/Cb4EJaZ0wmbr5/p0CMXiquJ SZLqSU7Xav3HvRhh4R6tf/MuBp3IPXkTMKebmXyx/GE0sl7SMnt0N7G8SQn8vV6b NUFXO4dXhk8Ub2mYz0aXaCKsLsRl2d9DM2hHSjvpiTr3RWudVMADhJWeIh7G8zmV WJZbj2BV+OT2GxkEZEEDjWCwfEonl3lAc7N3/gcCefSnP8c1p5VivwWgNz7gfH/7 DQ/gg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduudejudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpefgtdetfeegvefgfedtjedu keettddtjeduiedtvdevlefgffevffetgffhuddvveenucffohhmrghinhepvghnthgvrh hprhhishgvuggsrdgtohhmpdifihhkihhsohhurhgtvgdrohhrghenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopeiimhhlphhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpth htohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdho rhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 1 Feb 2025 07:20:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738412417; bh=Ws93likjfPWFMnK6CtxERXy6Lcbq+Nq9w7Ifvsu+4RE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=EutIe7x5aC+ZB8xxMmo3y82wyBqy9KEUANXG75uBBEhr9OtEmdOtsosmjkoBCVi9b pwp4MG8gxhVnlpzsN4Bt39GLHKnGKk9AFqwfuNTyt/5jURVGlhOFit51f2NHojeR4K XjAB/usaqOk5+RCtxpoP66JxIW4ZuSxCgKtgfssW0sjmX1fqo+IiAJTgxRintaN3/v d08016J9qLAEXKHMvxFnn/EV3Fy64ZNrKS/kcDn90GUTr93EiZ0CtKxMQ8thKTmXDH SMcx2JUMMGJZY+2A2hj3N/PLf/ROg400GNcX5GQTQ+Vk2udwdnYssGjY+le7m4yCqx Xw2aRJUjSUu3g== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 088CF81; Sat, 1 Feb 2025 13:20:17 +0100 (CET) Date: Sat, 1 Feb 2025 13:20:17 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Zhang Mingli Cc: PostgreSQL Hackers Subject: Re: Proposal to CREATE FOREIGN TABLE LIKE Message-ID: <202502011220.zky22md42obm@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42d3f855-2275-4361-a42a-826172ca2dc4@Spark> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Feb-01, Zhang Mingli wrote: > Our DBA team uses foreign tables for ETL processes in Greenplum and Cloudberry, > and we often need to create foreign tables that match the column definitions of local tables. > > When dealing with wide tables and lots of those foreign tables, it can get pretty tedious and mistakes happen easily. Sure. Did you consider IMPORT FOREIGN SCHEMA? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ […] indem ich in meinem Leben oft an euch gedacht, euch glücklich zu machen. Seyd es! A menudo he pensado en vosotros, en haceros felices. ¡Sedlo, pues! Heiligenstädter Testament, L. v. Beethoven, 1802 https://de.wikisource.org/wiki/Heiligenstädter_Testament