Re: Showing index details with \d on psql

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Showing index details with \d on psql
Date: 2001-10-13 15:43:55
Message-ID: 200110131543.LAA32183@smtp6.mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

..
> Notice the use of the _() macro. Also, looks like we have a
> PRIMARY KEY section in the code now.

New patch applied. I think I was able to wrap my brain around
the new _() macro and use of snprintf this early in the weekend.
:) I removed the separate counts of primary key and unique keys,
and simply added labels to the index list, since that's what
they are anyway.

One thing for someone to look into (I think it's related to the
backend/utils code, which I am not familiar with) is that any
describing of indexes in psql generates an error about
not finding the function 'pg_get_expr'

Sample output from this patch:

Table "b1"
Column | Type | Modifiers
- --------+--------------------------+--------------------------
post | integer | *
thread | smallint | not null *
reply | smallint | not null *
stat | character varying(1) | not null default 'N' * *
uid | integer | not null
ctime | timestamp with time zone | default 'now'
atime | timestamp with time zone |
Indexes abc (post, reply, stat)
def (stat)
foo_pkey [PRIMARY_KEY] (thread)

The code also makes allowances for the table pg_class, just in
case anyone does a \d on it (one of its indexes refers to column
"-2")

Greg Sabino Mullane
greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200110131131

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBO8hhcrybkGcUlkrIEQJtNACggHKbcz6+MXGkR34T/Woe8JyyP8EAoLty
ZxuvaVQQ3H34HYfNWsrDUOwr
=f2Oy
-----END PGP SIGNATURE-----

Attachment Content-Type Size
unknown_filename text/plain 7.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-10-13 15:47:17 Re: psql: default base and password reading
Previous Message Bruce Momjian 2001-10-13 05:13:43 Re: updated patch for Chinese NLS support (simplified)