From: Cristian Cappo A. <ccappo@cnc.una.py>
To: Joe Conway <mail@joeconway.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How access to array component
Date: Mon, 21 Jul 2003 15:17:27 -0400
Message-ID: <3F1C0407.32205.173766B@localhost> (raw)
In-Reply-To: <3F1A06B4.6090301@joeconway.com>
References: <3F180992.5070400@cnc.una.py>
Joe
Tried, but...
>> select (foo(10::int2,20::int2))[1];
>> ERROR: parser: parse error at or near "[" at character 32
I'm using the version 7.3.3
Thanks..
---
> Cristian Cappo wrote:
> > >>> select __function(10::int2, 20::int2)[1]
> > ^^^ parsing error.
> >
>
> Try:
>
> create or replace function foo(int2, int2 ) returns _varchar as '
> select ''{1,2}''::_varchar
> ' language 'sql';
>
> regression=# select (foo(10::int2, 20::int2))[1];
> foo
> -----
> 1
> (1 row)
>
> HTH,
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
------------------------------------
Cristian Cappo Araujo
Desarrollo de Proyectos - Direccion Tecnica
Centro Nacional de Computación
Universidad Nacional de Asunción
email: ccappo@cnc.una.py
tel. : 595-021-585550
fax : 595-021-585619
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-sql@postgresql.org
Cc: ccappo@cnc.una.py, mail@joeconway.com
Subject: Re: How access to array component
In-Reply-To: <3F1C0407.32205.173766B@localhost>
* 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