Обсуждение: pg_get_domaindef()

Поиск
Список
Период
Сортировка

pg_get_domaindef()

От
"FAST PostgreSQL"
Дата:
Hi All,

I am now trying to implement pg_get_domaindef() function which is in the TODO 
list and ran into a minor issue.

When the following command is given

CREATE DOMAIN testdomain AS text CONSTRAINT testconstraint NOT NULL;

I couldn't find the CONSTRAINT name ('testconstraint' in this case) being 
stored in the system catalog. Any idea where I can find it?

Or is it acceptable, for the above statement, for pg_get_domaindef() to 
return 

CREATE DOMAIN testdomain AS text CONSTRAINT NOT NULL;

Rgds,
Arul Shaji
This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 693 481. It is confidential to the
ordinaryuser of the email address to which it was addressed and may contain copyright and/or legally privileged
information.No one else may read, print, store, copy or forward all or any of it or its attachments. If you receive
thisemail in error, please return to sender. Thank you.
 

If you do not wish to receive commercial email messages from Fujitsu Australia Software Technology Pty Ltd, please
emailunsubscribe@fast.fujitsu.com.au
 



Re: pg_get_domaindef()

От
Volkan YAZICI
Дата:
On Oct 26 03:33, FAST PostgreSQL wrote:
> I couldn't find the CONSTRAINT name ('testconstraint' in this case) being 
> stored in the system catalog. Any idea where I can find it?

AFAIK, it is passed to the related procedure via a DomainIOData struct
that fcinfo->flinfo->fn_extra points to. (See domain_in() in
backend/utils/adt/domains.c)


Regards.


Re: pg_get_domaindef()

От
Volkan YAZICI
Дата:
On Oct 26 05:27, Volkan YAZICI wrote:
> On Oct 26 03:33, FAST PostgreSQL wrote:
> > I couldn't find the CONSTRAINT name ('testconstraint' in this case) being 
> > stored in the system catalog. Any idea where I can find it?
> 
> AFAIK, it is passed to the related procedure via a DomainIOData struct
> that fcinfo->flinfo->fn_extra points to. (See domain_in() in
> backend/utils/adt/domains.c)

Ah, please excuse my wrong answer. See GetDomainConstraints() function
in the same file.


Regards.