how to recover a domain types and constraints?

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: how to recover a domain types and constraints?
Date: 2011-06-12 05:05:12
Message-ID: 20110612070512.6daddeea@anubis.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi list,

I intend to recover domains type (I/O) and their constraints from my DB in
order to simplify the program that access the DB (so, using types & constraints
to auto-implement them into my program.)

I already found a query to recover domain types from a function:
SELECT function_args('testaddctr', 'public');
function_args
-------------------------------
(0,o,"RETURN VALUE",smallint)
(1,i,,dn_ctr)
(2,i,,dn_ctr)
(3 rows)

But how could I know that:
dn_ctr = smallint
dn_ctr constraints: NOT NULL & CHECK(VALUE > -1)
?

JY
--
BOFH excuse #172:
pseudo-user on a pseudo-terminal

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2011-06-12 19:34:27 images in one or more tables?
Previous Message Bruce Momjian 2011-06-11 03:39:13 Re: pg_ctl -o options