pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rony khoury <rkhoury@apotres.edu.lb>
To: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: select b[1] from foo
Date: Thu, 05 Nov 1998 08:32:40 +0200
Message-ID: <36414688.F6E97316@apotres.edu.lb> (raw)



Hello ,

Say I perform the following operations on my postgresql box :

create table foo (a int , b int[]) ;
insert into foo values(1,'{1,2,3}');
select * from foo ;
a | b
---------------
1 | {1,2,3}
select b[2] from foo ;

the question is why can't I execute the following statement , and If I
want to do an add , avg , sum , etc ... on the same element , how can I
do that ?
If someone can provide me with an example on how to do that I will be
gratefull .

thanks ,
Rony .




Message-ID: <36414688.F6E97316@apotres.edu.lb>
Permalink:  ../36414688.F6E97316@apotres.edu.lb/
Also on:    postgresql.org/message-id/36414688.F6E97316@apotres.edu.lb

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: rkhoury@apotres.edu.lb
  Subject: Re: select b[1] from foo
  In-Reply-To: <36414688.F6E97316@apotres.edu.lb>
  References: <36414688.F6E97316@apotres.edu.lb>

* 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