Обсуждение: Adding a copying type for array elements

Поиск
Список
Период
Сортировка

Adding a copying type for array elements

От
AlexK
Дата:
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, ...)

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.



Re: Adding a copying type for array elements

От
Pavel Stehule
Дата:



2014-02-26 21:12 GMT+01:00 AlexK <alkuzo@gmail.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers