Re: Patch to allow domains over composite types - Mailing list pgsql-hackers

From Asif Rehman
Subject Re: Patch to allow domains over composite types
Date
Msg-id CAAuGLxU7BxNtTR7187-znBFacD=kbWBOETKswY+uJx=DFewVkA@mail.gmail.com
Whole thread Raw
In response to Patch to allow domains over composite types  (Yeb Havinga <yebhavinga@gmail.com>)
Responses Re: Patch to allow domains over composite types  (Yeb Havinga <yebhavinga@gmail.com>)
List pgsql-hackers
Hi Yeb Havinga,

I was digging archives to see anyone worked on supporting domain's over composite type and found your patch, but that was pulled back. According to commitfest comments it needs some more work...

Are you going to submit the updated patch?

Regards,
--Asif

On Wed, May 11, 2011 at 5:07 PM, Yeb Havinga <yebhavinga@gmail.com> wrote:
typecmds.c says:
"Domains over composite types might be made to work in the future, but not today."

Attached is a patch that allows domains over composite types, together with test cases in domaincomp.sql. A domain over a composite type has typtype TYPTYPE_DOMAIN, but typrelid and typrelkind are empty: that information is only available in the pg_type record of the base type. The remainder of the patch follows from that choice. While parsing a record expression into a row type, an extra coercion node had to be inserted to ensure that the domain checks are called.

All regression tests are ok, comments are highly appreciated.

--

Yeb Havinga
http://www.mgrid.net/
Mastering Medical Data



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


pgsql-hackers by date:

Previous
From: Marti Raudsepp
Date:
Subject: [PATCH] Cleanup: use heap_open/heap_close consistently
Next
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Add new keywords SNAPSHOT and TYPES to the keyword list in gram.