Adding a copying type for array elements

Started by AlexKalmost 12 years ago2 messages
#1AlexK
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, ...)

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

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: AlexK (#1)
Re: Adding a copying type for array elements

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

Show quoted text

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