Lists: | pgsql-hackers |
---|
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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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 | Content-Type | Size |
---|---|---|
compositedomains.v1.patch | text/x-patch | 30.9 KB |
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Yeb Havinga <yebhavinga(at)gmail(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to allow domains over composite types |
Date: | 2011-05-11 20:04:22 |
Message-ID: | BANLkTinNMDugJbsX2Z8+dpe0q5WVTxyotQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, May 11, 2011 at 8:07 AM, Yeb Havinga <yebhavinga(at)gmail(dot)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.
I don't have time to look at this right now, but please add it to the
currently-open CommitFest:
https://commitfest.postgresql.org/action/commitfest_view/open
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Asif Rehman <asifalirehman(at)gmail(dot)com> |
---|---|
To: | Yeb Havinga <yebhavinga(at)gmail(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to allow domains over composite types |
Date: | 2012-02-27 11:49:52 |
Message-ID: | CAAuGLxU7BxNtTR7187-znBFacD=kbWBOETKswY+uJx=DFewVkA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
From: | Yeb Havinga <yebhavinga(at)gmail(dot)com> |
---|---|
To: | Asif Rehman <asifalirehman(at)gmail(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to allow domains over composite types |
Date: | 2012-02-27 14:07:23 |
Message-ID: | 4F4B8E1B.3090603@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 2012-02-27 12:49, Asif Rehman wrote:
> 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...
There were some issues with using the domains from pl/pgsql, which could
probably made to work, but I didn't investigate it because at the time
the use case for which is was needed was solved in a different way.
>
> Are you going to submit the updated patch?
There is no updated patch, sorry.
regards,
Yeb