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 1qfxuP-00Drxi-6y for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 07:34:05 +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 1qfxuN-0067IW-Uv for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 07:34:03 +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 1qfxuM-0067Hj-6C for pgsql-hackers@lists.postgresql.org; Tue, 12 Sep 2023 07:34:03 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qfxuH-0046eP-Vq for pgsql-hackers@postgresql.org; Tue, 12 Sep 2023 07:34:00 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AEF645C0130; Tue, 12 Sep 2023 03:33:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 12 Sep 2023 03:33:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; 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:sender:subject:subject:to:to; s=fm3; t= 1694504036; x=1694590436; bh=aPGedItcoyZ1PHFLBTwQN8zacpCvtLzWNN2 o+B2QOg8=; b=HQO2fTJlslEG61Rjen3ckLb7jw2dPHMlcQSb6vMVwSuftef8Nun MFizSHJV0wSulPvp6js4X3iTbx0ip4GL3MRITYeE5BYFWZ8S44xzp4mLFWUc05sw 0IQp/A6cFVvYcUo+55Bf4lkGpzcpLh2rTUXJVkV8bbA7A1PyWDimt/TKxnK1o/nf c5weJOqBg+OwSwk+VVDgB7OFsvKprTzXPUV1kKiw4/LJt0/tEHeGObpcjwEosiu6 WVbUHDYvWqqEGeqF2+PFrE5jKbyLpYUFrzFGJRViWt3d8HO+J1/zl+MIElmqmAwx o7secphFqi0PceBucgk7TDq7H8JpLSfOOAA== 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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1694504036; x= 1694590436; bh=aPGedItcoyZ1PHFLBTwQN8zacpCvtLzWNN2o+B2QOg8=; b=O cxkRt5WnBfJY7RLak19230whSuCch7l0Gtxdn51w5pX72zHPzfyMQYQ+z23ILwL5 +UCe1emDiNlmzNPriziySARhF40Ls8H4PowRMRzAwXPijlkhfox32Y9/5TydSEeD 2AR4PIDxrw7KcAFnQq/4JaxsK+wSEzlfOxIzk+yTTSbLkA4ir7wknJyiJMRrg/Db KwdOCorONnyIU31ER+k2sJ9BknDuM+APvAU24OYCk75xUBa6kibeo2MaSiGkvp6M 289u9UWHmOpo4Zu5b4kOASI+3Uv9OhGM4rjWRNPi2rTfohhL7FHz2VBvzTuFBpia SjLr/RuLy0qdw/9ynEoWQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeihedguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepleeigfetvddugeeijefggedvvefgteehteetuddvffet jefgleejvdfhheekheetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 03:33:55 -0400 (EDT) Message-ID: <4970adf1-cdb0-9ae5-d405-e9c3395d9931@eisentraut.org> Date: Tue, 12 Sep 2023 09:33:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: Adding a pg_get_owned_sequence function? Content-Language: en-US To: =?UTF-8?Q?Dagfinn_Ilmari_Manns=c3=a5ker?= , pgsql-hackers@postgresql.org References: <87jzwcsasv.fsf@wibble.ilmari.org> From: Peter Eisentraut In-Reply-To: <87jzwcsasv.fsf@wibble.ilmari.org> 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 09.06.23 21:19, Dagfinn Ilmari Mannsåker wrote: > I've always been annoyed by the fact that pg_get_serial_sequence takes > the table and returns the sequence as strings rather than regclass. And > since identity columns were added, the name is misleading as well (which > is even acknowledged in the docs, together with a suggestion for a > better name). If you are striving for less misleading terminology, note that the concept of an "owned sequence" does not exist for users of identity sequences, and ALTER SEQUENCE / OWNED BY cannot be used for such sequences. Would it work to just overload pg_get_serial_sequence with regclass argument types?