pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: De Leeuw Guy <G.De_Leeuw@eurofer.be>
To: Kristo Kaiv <kristo.kaiv@skype.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: get the array content whis the select clause
Date: Tue, 05 Jun 2007 22:50:51 +0200
Message-ID: <4665CCAB.4000704@eurofer.be> (raw)
In-Reply-To: <DFF9CC68-0B19-4464-B998-626911BF4360@skype.net>
References: <46647A79.3020401@eurofer.be>
	<DFF9CC68-0B19-4464-B998-626911BF4360@skype.net>

Great !!!

Many thanks Kristo, it's just what I need

Guy

Kristo Kaiv a écrit :
> i guess this what you meant:
> (not a nice solution though) writing a function that returns the set
> would be a better idea
>
> create table testintarr (iarr int[]);
> insert into testintarr values ('5,6,7,8');
>
> test=# select iarr[idx] from (select iarr,
> generate_series(array_lower(iarr,1), array_upper(iarr,1)) as idx from
> testintarr) asdf;
> iarr
> ------
>     5
>     6
>     7
>     8
> (4 rows)
>
> BR,
> Kristo
>
> On 04.06.2007, at 23:47, De Leeuw Guy wrote:
>
>> Hello all
>>
>> It is possible to return the content of an int array [] with a select
>> clause ?
>>
>> Thanks in advance for your respons
>>
>> Guy
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>>        subscribe-nomail command to majordomo@postgresql.org so that your
>>        message can get through to the mailing list cleanly
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq



view thread (4+ messages)  latest in thread

Message-ID: <4665CCAB.4000704@eurofer.be>
Permalink:  ../4665CCAB.4000704@eurofer.be/
Also on:    postgresql.org/message-id/4665CCAB.4000704@eurofer.be

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: G.De_Leeuw@eurofer.be, kristo.kaiv@skype.net
  Subject: Re: get the array content whis the select clause
  In-Reply-To: <4665CCAB.4000704@eurofer.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox