Re: Accessing an array element from a function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org (pgsql general list)
Subject: Re: Accessing an array element from a function
Date: 2004-09-30 22:59:20
Message-ID: 29762.1096585160@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
> This doesn't work:
> select myfunc(1,2)[1];

> This does work:
> select (myfunc(1,2)[1];

I suppose you meant

select (myfunc(1,2))[1];

> If that's how it's supposed to work, is that documented somewhere?

http://developer.postgresql.org/docs/postgres/sql-expressions.html#AEN1593

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mike cox 2004-10-01 01:23:07 earthdistance is not giving correct results.
Previous Message Scott Frankel 2004-09-30 22:31:18 readline install questions