Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPiIp-0006h4-VD for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 11:07:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPiIn-0002ku-UK for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 11:07:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPiIn-0002kk-Id for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 11:07:49 +0000 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPiIh-0005yY-BB for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 11:07:49 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id E05AE2B068B2; Wed, 8 Feb 2023 06:07:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 08 Feb 2023 06:07:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1675854460; x=1675861660; bh=C EdOwcLl6ijF9MKFyweOv2hSDJ9U+w/UtQ9rPv4BuQU=; b=UMFEmEEJ/O6kuAErX 6bUAwBYlHrh4mwSMJDpAUhvTxBuOtHIkcJuk4/oeCmxRaOUZHzQxJ5sLfuq7Xyef tG0ftvxKFtT0QBEgamZyO4raiZajCuTcfQ6hLyN/2bfajfd+FxbcwMVmiAluivxv +Lh7W8QfVnaaSU63dbetrTe55sR4EyNtB3oNZh/LZYJC5zyhiFp2xZH9fHaM4azY y0ceYlnA7U9cNzImoyWVZIyw41cpVjUjREZwRWKHKHIHqR59IUv6agdcz2le4pcM p8liwH+8YiGkgfKwITwr+mTpTxQYjmqiXKuxIV3nMJT27KscJmjdlNpSVjzVxB16 vKAOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehtddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Feb 2023 06:07:39 -0500 (EST) Message-ID: <10d743ad-2216-df5b-a966-38f154a6f53a@enterprisedb.com> Date: Wed, 8 Feb 2023 12:07:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Get the sequence name corresponding to a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY column Content-Language: en-US To: Sebastien Flaesch , "pgsql-general@lists.postgresql.org" References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.02.23 11:43, Sebastien Flaesch wrote: > select '"'||ns.nspname||'"."'||p.relname||'"' tabname, c.attname colname Just a side note: You might find the quote_ident() function useful.