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

>> 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.

Is pg_get_constraintdef() documented somewhere?  I'd like to know it's
arguments, return format, and whether it will be supported in future
postgres releases.

From what I see in pg_dump.c, it appears to accept an oid from the
pg_constraint table, and only work with foreign key constraints.
True?  That might be useful in some special-case code, but I really
want a method that will work with all types of constraint.  (The idea
here is to enumerate all constraints on a table, along with their
names, types, and constrained columns.)






view thread (5+ messages)  latest in thread

Message-ID: <7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com>
Permalink:  ../7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com/
Also on:    postgresql.org/message-id/7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com

 · 

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: lyris-pg@tibit.com, rbt@rbt.ca
  Subject: Re: how to determine array size
  In-Reply-To: <7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com>

* 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