Re: how to determine array size - Mailing list pgsql-sql

From Forest Wilkinson
Subject Re: how to determine array size
Date
Msg-id 7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com
Whole thread Raw
In response to Re: how to determine array size  (Rod Taylor <rbt@rbt.ca>)
Responses Re: how to determine array size
List pgsql-sql
>> 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.)





pgsql-sql by date:

Previous
From: "Mendola Gaetano"
Date:
Subject: Re: trigger error
Next
From: Rod Taylor
Date:
Subject: Re: how to determine array size