Re: Show sequences owned by - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Show sequences owned by
Date
Msg-id 7386.1320417867@sss.pgh.pa.us
Whole thread Raw
In response to Re: Show sequences owned by  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Show sequences owned by
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> I just noticed it was pulling from pg_depend and we could be creating
> multiple dependencies on a single sequence by having two tables use it
> as a default value.  If that situation doesn't cause a problem for this,
> then that's fine. :)  Couldn't remember if we distinguished 'owned by'
> from 'dependend upon' for seqeunces.

Yeah, we do, via the deptype.  The check for deptype = 'a' is the
correct thing here.

Still, I'm not terribly comfortable with having multiple matches be
treated as a reason to fail the entire \d command.  It'd likely be
better to just not add a footer if you get an unexpected number of
matches.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: IDLE in transaction introspection
Next
From: Tom Lane
Date:
Subject: Re: heap_page_prune comments