Обсуждение: Array in plpgsql with composite type

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

Array in plpgsql with composite type

От
grupos
Дата:
Hi Guys!

I need to make an array with composite type (varchar, float8) to get 
data from a table (description and price) BUT I am having no success... 
I searched a lot on the internet without success. On the PostgreSQL 
manual there is no information how to handle array with plpgsql with 
composite types. I tried to create a type (varchar, float8) but without 
success...

Can anyone send me some examples or references for arrays in plpgsql (I 
am using PostgreSQL 8.0.3).

Regards,

Rodrigo Carvalhaes

-- 
Esta mensagem foi verificada pelo sistema de antivírus eacredita-se estar livre de perigo.



Re: Array in plpgsql with composite type

От
Michael Fuhr
Дата:
On Mon, Jun 20, 2005 at 01:31:20PM -0300, grupos wrote:
> 
> I need to make an array with composite type (varchar, float8) to get 
> data from a table (description and price) BUT I am having no success... 

According to the "Arrays" section of the "Data Types" chapter in
the documentation, arrays of composite types aren't supported.

http://www.postgresql.org/docs/8.0/static/arrays.html

What problem are you trying to solve?  If you tell us more about
what you're doing then maybe we can suggest ways to do it.  One way
might be to use a procedural language like PL/Perl, PL/Tcl, or
PL/Python instead of PL/pgSQL.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/