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 1v3uhM-005X6k-JW for pgsql-docs@arkaria.postgresql.org; Wed, 01 Oct 2025 11:08:40 +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 1v3uhJ-000xr7-HU for pgsql-docs@arkaria.postgresql.org; Wed, 01 Oct 2025 11:08:38 +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 1v3uhJ-000xqz-AC for pgsql-docs@lists.postgresql.org; Wed, 01 Oct 2025 11:08:37 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v3uhH-0014Mc-2E for pgsql-docs@lists.postgresql.org; Wed, 01 Oct 2025 11:08:37 +0000 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-91122373653so233329639f.1 for ; Wed, 01 Oct 2025 04:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759316913; x=1759921713; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Wc0RyJNN4oLnpjHyDjI78O9bty/TEi6EHRerrgBecq4=; b=fjXLxKYPpMIwAemOuzij4Vt9vsgGbUQ73cSooZviDdzn48a1eRK+HBGDAr0HuOq9vA dcVuXSeYjJjUtG/0BNUHLsnnXf2bygocCiCsZk3CzUIDeqeSqll6LwEpljtjUqLiFrHJ zRH8cjKcNjVnX2dpretZDuaA9SmyeWV7h3EsiAcha8+L6XN0WPG0QLK1ON4EpYBfbCqo QOq7J4aN20NZ/AcEP07AJn4BwISaPCWegqFLX1WojEqjFL4Zk2RxARV+1APpejRfEc/+ mNwELMYl7Z222vrBzxInf5y1KkoWzGz3hiPcEE0J21SmdpnZKl/oIHeTxaQ3qmxCL2M7 OFxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759316913; x=1759921713; h=cc: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=Wc0RyJNN4oLnpjHyDjI78O9bty/TEi6EHRerrgBecq4=; b=s/47TQhrnBpOaNd2ySVq3C8VQXntf3XmIT3m4KyMqB4YEQvX8dHKsjC509J/wLjO6K 5BBAjnccuxpBU9w+QQD/jZCS/3n5ul3YNJJdkQa/15ksXSG/7wx9HmHlE9e4CWmvfB5j fSLuGUnPRcoQmOS2mwHY5NwKqARQdhRYgp/KQY9Z+E1qvdO39Enp4O0IozRuDeJg0qmZ WViQbpXe7EkC+rGIeBcYPUZImKs0TauuaD3sjzEweBK/apMJtB1oPtlaH4GAA7SxS1f/ IvDksGj89k1R5lEVM6ZcLuKAHmNB4dU7U5bSut+VgueTxbwisN9pdtPvdeiYcKtcyWtZ TK+w== X-Gm-Message-State: AOJu0YzKWW7oYqpdh+q5/JQoDppfED3fk0vviLlJnfEL/BXBg73RkpZP Yu5r1oBOO7xvDJeAIyG7xcZROgeEMBBuYUXF8lYLu8ZpZSwavTkHdP8aLDrhvHn6mZgBsBh0GwF zRU5dcVb52X5653vc4eEcJHtJkgOQL00= X-Gm-Gg: ASbGncuZVtW6gS1R4nCSE0hX3kwrpqW4cMG++70bUfYsj9m9rT3ajfEfyd1dpmrx/Tr 9cHFkLK0rEZ10WL0iFE+wEiJQLzmhoN8bFfYwgFLS6zsF2NB12Xzd1D6njuX9rD20F3MwyYuz0E gcESCqEDdPazV/B3WO2SSYNQWWEsa9aqk6NzYb87qksm5XZ/9LnPGPG/MM2xQvtmTkj8GUiWYts RqZJZXXqMfyLLsskjI4BNmaY2huJ6e/TUDnAy0U4Rh+kl+5LPVGHmbHLoKguzvX+w== X-Google-Smtp-Source: AGHT+IGEXXnFrWxVgtDNotK7N3M23pmKBi0O3AygZ0iDxYdRU6R3BgWGO2m7R/oR4/AQEHJCWp/XK4pvTQcE/j0qPiY= X-Received: by 2002:a05:6e02:1b07:b0:425:744b:52d3 with SMTP id e9e14a558f8ab-42d815c5a25mr47562935ab.11.1759316912742; Wed, 01 Oct 2025 04:08:32 -0700 (PDT) MIME-Version: 1.0 References: <61f2cfed.17a9.1999f3ab6b2.Coremail.msdnchina@163.com> In-Reply-To: <61f2cfed.17a9.1999f3ab6b2.Coremail.msdnchina@163.com> From: Greg Sabino Mullane Date: Wed, 1 Oct 2025 07:07:57 -0400 X-Gm-Features: AS18NWDjcCcTrxqdbX06Egq2vNhfMPZ_gNa5Abx0i6DX-4fjqmxBY-MDHr_-B8o Message-ID: Subject: =?UTF-8?Q?Re=3A_in_the_different_schema_=EF=BC=8Cthe_sequence_name_is_?= =?UTF-8?Q?same=EF=BC=8C_and_a_table=27s_column_definition_use_this_sequence=2Cso?= =?UTF-8?Q?=EF=BC=8Chow_can_I_identify_sequence=27s_schema_name_by_system_view=2F?= =?UTF-8?Q?table=3A?= To: yanliang lei Cc: "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000a1a6d4064016e39c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a1a6d4064016e39c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 1, 2025 at 6:04=E2=80=AFAM yanliang lei wro= te: > the column c1 in the schema_1.test_tab_100 is associated with which > sequence ?? *schema_1*.seq_xx_yy or *public*.seq_xx_yy?? > This is better asked on the pgsql-general mailing list, but the short answer is that you have to look at your search_path as well. Since you just created schema_1, and public is in your search_path, a plain seq_xx_yy is the one from the public schema. To see the fully-qualified name, run: SET search_path =3D pg_catalog; before issuing your select from information_schema.columns Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --000000000000a1a6d4064016e39c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 1, 2025 at 6:04=E2=80=AFAM ya= nliang lei <msdnchina@163.com&g= t; wrote:
=C2=A0the column c1 in th= e schema_1.test_tab_100 is associated with which sequence ?? schema_1.seq_xx_yy or public.seq_xx_yy??

This is better asked on the pgsql-general mail= ing list, but the short answer=C2=A0is that you have to look at your search= _path as well. Since you just created schema_1, and public is in your searc= h_path, a plain seq_xx_yy is the one from the public schema. To see the ful= ly-qualified name, run:

SET search_path =3D pg_cat= alog;

before issuing your select from information_= schema.columns
=C2=A0
Cheers,
Greg

--
Enterprise Postg= res Software Products & Tech Support

--000000000000a1a6d4064016e39c--