public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: yanliang lei <[email protected]>
Cc: [email protected] <[email protected]>
Subject:  Re: in the different schema ,the sequence name is same, and a table's column definition use this sequence,so,how can I identify sequence's schema name by system view/table:
Date: Wed, 1 Oct 2025 07:20:34 -0500
Message-ID: <CAKFQuwaHbepRV5PRb-J-uTgJRSWCsdPXM3SY5KivVPa+y2xM7w@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Wednesday, October 1, 2025, yanliang lei <[email protected]> wrote:
>
> dbversion180=# create table schema_1.test_tab_100(c1 int default
> nextval('seq_xx_yy'));
>

Since you didn’t schema qualify the sequence name every single time a
default value is created the sequence will be looked up anew.  The stored
expression is not associated with any specific object.

This is also why there is a separate step to mark a sequence as being owned
by a table.  That establishes a dependency that this textual form is unable
to do.

David J.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re:  Re: in the different schema ,the sequence name is same, and a table's column definition use this sequence,so,how can I identify sequence's schema name by system view/table:
  In-Reply-To: <CAKFQuwaHbepRV5PRb-J-uTgJRSWCsdPXM3SY5KivVPa+y2xM7w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox