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

From Magnus Hagander
Subject Re: Show sequences owned by
Date
Msg-id CABUevEyHnFqYQZcT-6jV_-SCJrxLjNC4w3YhA533b9wM3iZ-Ow@mail.gmail.com
Whole thread Raw
In response to Re: Show sequences owned by  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Show sequences owned by
List pgsql-hackers
On Fri, Nov 4, 2011 at 15:19, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> The attached patch makes the \d output for psql on a sequence show
>> which table/column owns the sequence. The table already showed the
>> dependency the other way through the default value, but going from
>> sequence back to table was not possible.
>
>> Comments/reviews?
>
> The join conditions are far from adequate.  You can *not* just check the
> objid, you *must* check classid (and refclassid) to avoid being fooled

Uh, it does check classid. Or are you saying it's checked the wrong way?

But it's not checking refclassid, that's true - and should be fixed.

> by duplicate OIDs in different system catalogs.  You've also not held
> to psql's normal conventions about fully qualifying names to avoid
> making assumptions about the search_path.

Will fix.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Show statistics target in \d+
Next
From: Yoann Moreau
Date:
Subject: Re: Term positions in GIN fulltext index