PostgreSQL catalogues: how to find the primary key?

From: Roland Roberts <roberts(at)panix(dot)com>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: PostgreSQL catalogues: how to find the primary key?
Date: 1998-08-03 01:44:32
Message-ID: x6emuyzvnj.fsf_-_@tycho.rlent.pnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----

I've been trying to get Keystone (http://www.stonekeep.com/keystone/)
up and running. The PHP script it uses are really oriented to MySQL,
although there is a mostly complete set of PostgreSQL functions
written for it. One thing missing is a query to find the primary key
on a table.

What catalogues do I need to query to find this? Is there some
documentation on the catalogues (I didn't find any, but....).

On a similar note, I've managed to figure out how to find column
widths but looking at the pg_attribute table and subtracting 4 from
the value of atttypmod for strings, including char(). However, that
was slightly non-obvious. The "old" PHP scripts looked at the attlen
column which no longer seems to apply...am I doing the right thing
here?

roland

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNcUV/eoW38lmvDvNAQH6bQP/SaTCxbntNKsNqW46i7kCxpNN/YOtf0z3
ghLlC4Wh9xy/lLgFh9WOjg/Q7ecdA+jL2BCRVTVlWZG0pOwIgXWBZFAyxiz5dKSG
h47jKI97RZi7C8fjXVY3H3RFnpzBtDduK0fMPoPhqXikvfcL0+LrJ9cBwVFSK4I1
6hTxhGU38hc=
=25uZ
-----END PGP SIGNATURE-----
--
Roland B. Roberts, PhD Custom Software Solutions
roberts(at)panix(dot)com 101 West 15th St #4NN
New York, NY 10011

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gibson 1998-08-03 04:59:55 Broken Pipe with dbf2pg
Previous Message Brett W. McCoy 1998-08-03 00:46:35 Re: [GENERAL] [Fwd: PostgreSQL - Desparate!]