From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Show sequences owned by |
Date: | 2011-11-04 14:55:03 |
Message-ID: | CABUevEzMckUZPZf3KJwGQSob2t_bPb6q2YqGun62mCXzVcg_Yw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 4, 2011 at 15:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Stephen Frost <sfrost(at)snowman(dot)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.
Ok.
Updated patch attached that does this, and the proper schema qualifications.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachment | Content-Type | Size |
---|---|---|
sequence_owned_by.patch | text/x-patch | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-11-04 15:01:19 | Re: Show statistics target in \d+ |
Previous Message | Tom Lane | 2011-11-04 14:46:24 | Re: heap_page_prune comments |