From: | "Ferdinand Gassauer" <gassauer(at)kde(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4547: sort columns in \d |
Date: | 2008-11-23 16:19:38 |
Message-ID: | 200811231619.mANGJciW041976@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4547
Logged by: Ferdinand Gassauer
Email address: gassauer(at)kde(dot)org
PostgreSQL version: 8.3.5
Operating system: any
Description: sort columns in \d
Details:
currently the columns are sorted by attnum (not very userfriendly) instead
of attname (userfriendly)
this patch fixes this and makes the output of \d much more usable.
thank you for listening
--- describe.c.dist 2008-11-23 16:59:07.000000000 +0100
+++ describe.c 2008-11-23 16:59:28.000000000 +0100
@@ -867,7 +867,7 @@ describeOneTableDetails(const char *sche
appendPQExpBuffer(&buf, "\nWHERE a.attrelid = '%s' AND a.attnum > 0
AND NOT a.attisdropped", oid);
if (tableinfo.relkind == 'i')
appendPQExpBuffer(&buf, " AND a.attrelid = i.indexrelid");
- appendPQExpBuffer(&buf, "\nORDER BY a.attnum");
+ appendPQExpBuffer(&buf, "\nORDER BY a.attname");
res = PSQLexec(buf.data, false);
if (!res)
From | Date | Subject | |
---|---|---|---|
Next Message | toruvinn | 2008-11-23 16:36:13 | Re: BUG #4547: sort columns in \d |
Previous Message | Gregory Stark | 2008-11-22 22:56:15 | Re: could not read block 77 of relation 1663/16385/388818775 |