X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 10EFD30DD16 for ; Tue, 10 Jun 2003 12:04:30 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 68204-07 for ; Tue, 10 Jun 2003 09:04:19 -0300 (ADT) Received: from mailav.tor1.inquent.com (mail.inquent.com [216.208.117.106]) by svr1.postgresql.org (Postfix) with ESMTP id 7942130DB90 for ; Tue, 10 Jun 2003 09:04:19 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 2591C10258; Tue, 10 Jun 2003 07:58:20 -0400 (EDT) Received: from [192.168.1.200] (HSE-Toronto-ppp116801.sympatico.ca [216.209.81.112]) by mailav.tor1.inquent.com (Postfix) with ESMTP id C30DF10248; Tue, 10 Jun 2003 07:58:17 -0400 (EDT) Subject: Re: how to determine array size From: Rod Taylor To: Forest Wilkinson Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ie+hh3dgBXUFmLUkp31N" Organization: Message-Id: <1055246667.56597.39.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 10 Jun 2003 08:04:27 -0400 X-Virus-Scanned: by AMaViS perl-11 X-Archive-Number: 200306/80 X-Sequence-Number: 13838 --=-ie+hh3dgBXUFmLUkp31N Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2003-06-09 at 16:23, Forest Wilkinson wrote: > I need to enumerate the constraints on any given column in a table, so > I'm examining pg_constraint to get the relevant information. The > conkey array contains a list of constrained columns, and although I am > able to check conkey[1] for constraints on a single column, I would > like to properly handle multi-column constraints. You may have an easier time dealing with pg_get_constraintdef() than trying to get the info from the source. The above function outputs the necessary SQL to rebuild the constraint, and is used by pg_dump. --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-ie+hh3dgBXUFmLUkp31N Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+5clL6DETLow6vwwRAn6DAJ9cyCBout/hd+WHzycFNMVNKT8ougCghclP Hp6teYnjgFcPU4fwZ4l0A+c= =EjDY -----END PGP SIGNATURE----- --=-ie+hh3dgBXUFmLUkp31N--