Re: Have \d show child tables that inherit from the specified parent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, "damien(at)dalibo(dot)info" <damien(at)dalibo(dot)info>, Greg Sabino Mullane <greg(at)turnstep(dot)com>
Subject: Re: Have \d show child tables that inherit from the specified parent
Date: 2009-07-07 16:35:54
Message-ID: 8727.1246984554@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On Sunday 10 May 2009 03:05:48 damien(at)dalibo(dot)info wrote:
>> Here's a second version. Main changes are :
>>
>> * Child tables are sorted by name
>> * \d only shows the number of child tables
>> * \d+ shows the full list

> Committed.

I looked at this patch. I'm a bit disturbed by the
ORDER BY c.oid::pg_catalog.regclass
business. I doubt that does what the author thinks, and I'm not sure
what we really want anyway. If we want the child table names sorted
alphabetically then the regclass value needs to be further cast to text,
ie
ORDER BY c.oid::pg_catalog.regclass::pg_catalog.text

As-is, it's sorting by the OID values, which is almost like sorting the
children in creation order, which might possibly be thought preferable
... except that once the OID counter wraps around we won't be able to
guarantee that anymore.

Comments?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-07-07 16:38:03 Re: Maintenance Policy?
Previous Message Kevin Grittner 2009-07-07 16:30:45 Re: [HACKERS] commitfest.postgresql.org