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 1vE4w2-004N7U-FG for pgsql-general@arkaria.postgresql.org; Wed, 29 Oct 2025 12:05:49 +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 1vE4w1-000bdG-Cu for pgsql-general@arkaria.postgresql.org; Wed, 29 Oct 2025 12:05:48 +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 1vE4w1-000bd8-2A for pgsql-general@lists.postgresql.org; Wed, 29 Oct 2025 12:05:48 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vE4vx-004sdU-2x for pgsql-general@lists.postgresql.org; Wed, 29 Oct 2025 12:05:47 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-290cd62acc3so79824235ad.2 for ; Wed, 29 Oct 2025 05:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761739543; x=1762344343; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=4f+y+d2mmK4YcC6HtKw0DNUfahoh/8eesKxyjznBcjc=; b=aEKbYrwFYr8ay+AL1f0KwnAkMavvjrebuQSMtx6jwZiQxWscC/SuIikfIjRB9kopjw 59+F872NwQj5P4qlW2SGv9GRzUIjcWLVF1ev6rbS3SAEaoYi8nUkAMuEQ1y28x64aPYF vTdXZtPYx2EUaaWRILvK51/DyaTTQ2b5R5rtkouObGsJW8dH7XOixLOSnd1ZyL+lNLb4 5yv4KVg4G/YIPl74VijUrU8SyfXk+k+DNAeEZLb2yPNhtV/k1//XmCk1fvGSV4x/pOl8 IyodinRRBilJ504ywXTT+BouIHahg4BIbnDccWDWp/1twbZYdTM9d+aVTvfeMPQD3yMA xvaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761739543; x=1762344343; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4f+y+d2mmK4YcC6HtKw0DNUfahoh/8eesKxyjznBcjc=; b=lPqOyPkBBnK0JjwdTXkVPMZdeg+XwYgkwB2ALgnJx059JtNBph8fV56/TpJsVYU1gF S9FMDqgnTq/Ov9lUYGU4+eZIsSbxfM00k9HT6H5YxLQ5h4cdraHTOotkI3JMaQlBNiRv qjeOCsORCWtEK+zeYr+f8QEUj9n32m17qGcSBexwDfRq8t2RvkfNNbq6OSu626B0q7x6 YEh+Ul1ixPKGIVAWyJVfISKuT37gMEtFb0gV+0sFccdzKElFdB8GJm2ImPVwT7y+86vP /HByWRhz3OYzZ90luKWO+B5etnWT9PYebKhsTyPYXy2iNKPtXmdH0bzyNMgqjVlpQAtk iMgg== X-Gm-Message-State: AOJu0YwOE2KyksMwmV4t+ljWNg13vK4boSBLl/1zk/TBkbKQYTyvvqM6 HEEhUvIlZrY3gMVfwHI0tFs2X7ioeTGAQYczpg5Wti3kKreBV/gRlmlCMyBmwuGvgVH67spO9nL v9lZ/Eh0ipMtEAIMwDTyTYZc3FIzq35+cELfQ X-Gm-Gg: ASbGncsicCf9+emJYio0wy3GPlOss0XvGCrRMHZ0VvM6ZL3SOeGBLNV/pN7ZPWqW4b1 ghqp1DO/9FLfyI+Ppuz4QLy7Lp8eLZZSdRToHUHsaX5sA06+hHtDO94TmOS8DgzJDL9VNavpdlN gpp0JcLtP4xmedj7iO5qUYsZn/8s9wgdohjXY00f5vFV3Cqkb+B3Mp6ca+FtueYfVP027drONOR EO2t2hgVrI23U1UHS1NDao8/7dB9r6uVYKsLdL7Kf9gaw/ay7HZrZvjFBdGwZYOHyP/+V3RsqEm HLWtA/3R+Gow6T6JPaK/xpHVj/HpYgvCFHAsixNFSOMhRUUdxosYNyLOztfhnGHiyN1P0G+rIAQ 5LizZ6gLL21hWyMMp0bC9dKYN75WWueKOhPk1bFHqZoULTaGxOLffyb1zoMGo X-Google-Smtp-Source: AGHT+IHm6ThouZT5TrL7RcSZIatBESN/YAZNYRETGJuiWsjDFhRTq4JyzyZAEkGllqxFwwquVMM2Enak5zdCU7XKxYk= X-Received: by 2002:a17:902:e74c:b0:293:623:3246 with SMTP id d9443c01a7336-294dee2db5emr33710375ad.13.1761739542566; Wed, 29 Oct 2025 05:05:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Colin 't Hart" Date: Wed, 29 Oct 2025 13:05:30 +0100 X-Gm-Features: AWmQ_blka7eVd7WNsctcRwiqmXXnxt0oPmjKiDX1zFAN45f8eN41p4bQhFZIjlE Message-ID: Subject: Re: Two sequences associated with one identity column To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks. But as I wrote above, trying to alter either of the two sequences and specifying "owned by none" results in the error. /Colin On Wed, 29 Oct 2025 at 13:02, hubert depesz lubaczewski wrote: > > 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 >