select b[1] from foo

From: "rony khoury" <rkhoury(at)apotres(dot)edu(dot)lb>
To: "pgsql-sql(at)postgreSQL(dot)org" <pgsql-sql(at)postgreSQL(dot)org>
Subject: select b[1] from foo
Date: 1998-11-05 06:32:40
Message-ID: 36414688.F6E97316@apotres.edu.lb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 .

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 1998-11-05 12:08:25 Re: Rules (was: Re: [SQL] How can I optimize...)
Previous Message Charles Day 1998-11-04 16:26:29 updating database