pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Forest Wilkinson <lyris-pg@tibit.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to determine array size
Date: 10 Jun 2003 08:04:27 -0400
Message-ID: <1055246667.56597.39.camel@jester> (raw)
In-Reply-To: <nqh9ev007tlivjj1nnakco0ci541jucse5@4ax.com>
References: <nqh9ev007tlivjj1nnakco0ci541jucse5@4ax.com>

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.

-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (5+ messages)  latest in thread

Message-ID: <1055246667.56597.39.camel@jester>
Permalink:  ../1055246667.56597.39.camel@jester/
Also on:    postgresql.org/message-id/1055246667.56597.39.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rbt@rbt.ca, lyris-pg@tibit.com
  Subject: Re: how to determine array size
  In-Reply-To: <1055246667.56597.39.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox