Re: Adding a copying type for array elements

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: AlexK <alkuzo(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding a copying type for array elements
Date: 2014-02-26 20:18:30
Message-ID: CAFj8pRBp05+At790dnnvJMqFghsiGCV==2M_OLcWCrViOcf6xQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-02-26 21:12 GMT+01:00 AlexK <alkuzo(at)gmail(dot)com>:

> It would be nice to be able to declare something like this for a function
> returning an unnested array:
>
> RETURNS TABLE(some_value mytable.myarray_column%ELEMENT_TYPE, ...)
>

it has sense, but it is dangerous with current implementation. There are no
persistent relation between table and type used in signature.

So better use raw types or polymorphic types there only.

Pavel

>
> Does it make sense?
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Adding-a-copying-type-for-array-elements-tp5793762.html
> Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
>
>
> --
> 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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-02-26 20:45:06 Re: jsonb and nested hstore
Previous Message AlexK 2014-02-26 20:12:30 Adding a copying type for array elements