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

Patch to allow domains over composite types

From: Yeb Havinga <yebhavinga(at)gmail(dot)com>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Patch to allow domains over composite types
Date: 2011-05-11 12:07:55
Message-ID: 4DCA7C1B.7010909@gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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


Attachment: compositedomains.v1.patch
Description: text/x-patch (30.9 KB)

Responses

pgsql-hackers by date

Next:From: Pavan DeolaseeDate: 2011-05-11 12:46:31
Subject: Re: crash-safe visibility map, take five
Previous:From: Robert HaasDate: 2011-05-11 11:53:47
Subject: Re: VARIANT / ANYTYPE datatype

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