X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id F3703D1C4E3 for ; Mon, 21 Jul 2003 19:14:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 18154-01 for ; Mon, 21 Jul 2003 19:14:08 +0000 (GMT) Received: from alpha.cnc.una.py (alpha.cnc.una.py [200.10.228.103]) by svr1.postgresql.org (Postfix) with ESMTP id 6BEC1D1C4C8 for ; Mon, 21 Jul 2003 16:14:02 -0300 (ADT) Received: from ccappo ([200.10.228.84]) by alpha.cnc.una.py (8.11.6/8.11.6) with ESMTP id h6LJHP421442; Mon, 21 Jul 2003 15:17:29 -0400 From: "Cristian Cappo A." To: Joe Conway Date: Mon, 21 Jul 2003 15:17:27 -0400 MIME-Version: 1.0 Subject: Re: How access to array component Cc: pgsql-sql@postgresql.org Message-ID: <3F1C0407.32205.173766B@localhost> In-reply-to: <3F1A06B4.6090301@joeconway.com> References: <3F180992.5070400@cnc.una.py> X-mailer: Pegasus Mail for Windows (v4.11) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/311 X-Sequence-Number: 14425 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