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 1vE4tK-004MPd-46 for pgsql-general@arkaria.postgresql.org; Wed, 29 Oct 2025 12:03:01 +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 1vE4tI-000Wg6-UD for pgsql-general@arkaria.postgresql.org; Wed, 29 Oct 2025 12:02:59 +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 1vE4tI-000Wfy-JX for pgsql-general@lists.postgresql.org; Wed, 29 Oct 2025 12:02:59 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vE4tF-004sa2-1a for pgsql-general@lists.postgresql.org; Wed, 29 Oct 2025 12:02:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description; bh=/xJKUFjnhorpF6VYPwIKnZ/dtNyKnmKkYBODisnuVvQ=; b=Kk7tyF53IXnF/IIPNJVNNjrRDK GVVnXaYWn9e1QU8pBxg+ohdhzQn25NWr+mE8dvUfGsvTdJu67bGPKcPcvPcV5Ssmj3R/3cFZpAJ72 4YtJOvwCrGkMem+J13WCx7KoOPeshGah90f8OcuWgErujmWZapSfL0EBjgqI/IXjRAXk=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1vE4tE-0032Gc-0K; Wed, 29 Oct 2025 13:02:56 +0100 Date: Wed, 29 Oct 2025 13:02:56 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Colin 't Hart Cc: pgsql-general@lists.postgresql.org Subject: Re: Two sequences associated with one identity column Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Oct 29, 2025 at 12:27:44PM +0100, Colin 't Hart wrote: > One of my clients has a database in which a single identity column > (called "id" in that table) has two sequences associated with it(!) > Both sequences display > Sequence for identity column: ..id > when described with \d in psql. > Trying to drop either sequence results in Try: ALTER SEQUENCE some_seq_name OWNED BY none; DROP SEQUENCE some_seq_name; Best regards, depesz