Skip site navigation (1) Skip section navigation (2)

Re: how to recover a domain types and constraints? [SOLVED]

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to recover a domain types and constraints? [SOLVED]
Date: 2011-06-13 19:22:03
Message-ID: 20110613212203.26a6d0c3@anubis.defcon1 (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Sun, 12 Jun 2011 07:05:12 +0200, "Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com>

Never mind: I found what I was looking for by analyzing pgadmin3 queries :)

> 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)
> ?
// Minor lesson: don't fuck about with something you don't fully understand
		-- the dosdoom source code

In response to

pgsql-novice by date

Next:From: Jean-Yves F. BarbierDate: 2011-06-14 00:39:29
Subject: permissions PB
Previous:From: Andreas KretschmerDate: 2011-06-13 13:28:32
Subject: Re: Need a SQL to find if table has OIDS

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group