Re: how to determine array size

From: Forest Wilkinson <lyris-pg(at)tibit(dot)com>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to determine array size
Date: 2003-06-10 17:45:36
Message-ID: 7c5cev0486tkbu5rdne84cki9fvim3l60n@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2003-06-10 19:30:29 Re: how to determine array size
Previous Message Mendola Gaetano 2003-06-10 16:27:48 Re: trigger error