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

From Robert Haas
Subject Re: PL/Python: domain over array support
Date
Msg-id CA+TgmoYTkDFdSihxbrtwpYK6RmsQwT-9pvmmYBi8sS_OoEv9wA@mail.gmail.com
Whole thread Raw
In response to PL/Python: domain over array support  (Rodolfo Campero <rodolfo.campero@anachronics.com>)
Responses Re: PL/Python: domain over array support
List pgsql-hackers
On Sat, Oct 26, 2013 at 9:17 AM, Rodolfo Campero
<rodolfo.campero@anachronics.com> wrote:
> The attached patch add support of domains over arrays to PL/Python (eg:
> CREATE DOMAIN my_domain AS integer[]).
>
> Basically it just uses get_base_element_type instead of get_element_type in
> plpy_typeio.c, and uses domain_check before returning a sequence as array in
> PLySequence_ToArray whenever appropriate.
>
> There's one line I'm not sure about; I modified a switch statement (line
> 427):
>     switch (element_type ? element_type : getBaseType(arg->typoid))
> The rationale is that when element_type is set, it is already a base type,
> because there is no support of arrays of domains in PostgreSQL, but this may
> not held true in the future.

Please add your patch here so that it doesn't get forgotten about:

https://commitfest.postgresql.org/action/commitfest_view/open

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: RULE regression test fragility?
Next
From: Tom Lane
Date:
Subject: Re: RULE regression test fragility?