Skip site navigation (1) Skip section navigation (2)

Re: Accessing array datatype

From: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: "maria s" <psmg01(at)gmail(dot)com>,"Osvaldo Rosario Kussama" <osvaldo(dot)kussama(at)gmail(dot)com>,<pgsql-sql(at)postgresql(dot)org>,"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>,"Ivan Sergio Borgonovo" <mail(at)webthatworks(dot)it>
Subject: Re: Accessing array datatype
Date: 2008-07-28 16:56:11
Message-ID: 020001c8f0d2$d6e88460$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

You mean your array has a variable size, which you need to know in order to properly construct a query?

Dunno much about arrays, but here is said that array_upper( your_array, 1 ) returns the upper bound of the array...

Can this be what you need...?

  ----- Original Message ----- 
  From: maria s 
  To: Osvaldo Rosario Kussama ; pgsql-sql(at)postgresql(dot)org ; Pavel Stehule ; Ivan Sergio Borgonovo 
  Sent: Monday, July 28, 2008 5:09 PM
  Subject: [SQL] Accessing array datatype

  Hi All,
  I have an array column in a table. 
  How can I fetch the elements separately( ie, select arr[1],arr[2]...arr[n]) as a column,
   when I don't know how many elements are there in the array?

  Thanks for your help.


In response to


pgsql-sql by date

Next:From: Oliveiros CristinaDate: 2008-07-28 17:21:14
Subject: Re: Accessing array datatype
Previous:From: maria sDate: 2008-07-28 16:09:31
Subject: Accessing array datatype

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group