Re: PL/Python: domain over array support - Mailing list pgsql-hackers

From Rodolfo Campero
Subject Re: PL/Python: domain over array support
Date
Msg-id CAHNrXgEBC7sNmCF+XoTy2FiEQ6nE4RuqZ4qL7HdG-zWLfUe0tg@mail.gmail.com
Whole thread Raw
In response to Re: PL/Python: domain over array support  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
<div dir="ltr">Done, thanks.<div class="gmail_extra"><br /><br /><div class="gmail_quote">2013/10/28 Robert Haas <span
dir="ltr"><<ahref="mailto:robertmhaas@gmail.com" target="_blank">robertmhaas@gmail.com</a>></span><br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div
class="HOEnZb"><divclass="h5">On Sat, Oct 26, 2013 at 9:17 AM, Rodolfo Campero<br /> <<a
href="mailto:rodolfo.campero@anachronics.com">rodolfo.campero@anachronics.com</a>>wrote:<br /> > The attached
patchadd support of domains over arrays to PL/Python (eg:<br /> > CREATE DOMAIN my_domain AS integer[]).<br />
><br/> > Basically it just uses get_base_element_type instead of get_element_type in<br /> > plpy_typeio.c,
anduses domain_check before returning a sequence as array in<br /> > PLySequence_ToArray whenever appropriate.<br />
><br/> > There's one line I'm not sure about; I modified a switch statement (line<br /> > 427):<br /> >    
switch(element_type ? element_type : getBaseType(arg->typoid))<br /> > The rationale is that when element_type is
set,it is already a base type,<br /> > because there is no support of arrays of domains in PostgreSQL, but this
may<br/> > not held true in the future.<br /><br /></div></div>Please add your patch here so that it doesn't get
forgottenabout:<br /><br /><a href="https://commitfest.postgresql.org/action/commitfest_view/open"
target="_blank">https://commitfest.postgresql.org/action/commitfest_view/open</a><br/><span class="HOEnZb"><font
color="#888888"><br/> --<br /> Robert Haas<br /> EnterpriseDB: <a href="http://www.enterprisedb.com"
target="_blank">http://www.enterprisedb.com</a><br/> The Enterprise PostgreSQL Company<br
/></font></span></blockquote></div><br/></div></div> 

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Detection of nested function calls
Next
From: Andrew Dunstan
Date:
Subject: Re: OSX doesn't accept identical source/target for strcpy() anymore