Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7NFihP01260 for ; Thu, 23 Aug 2001 11:44:43 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 107193; Thu, 23 Aug 2001 08:44:37 -0700 From: "Josh Berkus" Subject: Re: Function returning an array To: Francesco Casadei Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Thu, 23 Aug 2001 08:44:37 -0700 Message-ID: In-Reply-To: <20010823165830.A2359@goku.kasby> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===107193====davinci.ethosmedia.com===_" X-Archive-Number: 200108/292 X-Sequence-Number: 4538 This is a multi-part MIME message --_===107193====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Ciao Francesco: > What's the correct syntax to return two VARCHAR(255)? There isn't one. At this time, functions cannot return arrays. Look for a fix to this limitation with version 7.2 or later. Jan Wieck and others have been working to extend functions so that they may manipulate and return cursors. However, that functionality is still in development and I don't know whether it will be included in the next release. In the meantime, I suggest that you take one of the following courses: 1. Delimit or tokenize your function output and parse it on the receiving end into 2 fields (e.g. 'element 1|element2') 2. Do the operation in your middleware, where you can use C, Java, Python or similar to pass arrays. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===107193====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===107193====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===107193====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===107193====davinci.ethosmedia.com===_--