pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Francesco Casadei <f_casadei@libero.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function returning an array
Date: Thu, 23 Aug 2001 08:44:37 -0700
Message-ID: <web-107193@davinci.ethosmedia.com> (raw)
In-Reply-To: <20010823165830.A2359@goku.kasby>

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







view thread (4+ messages)  latest in thread

Message-ID: <web-107193@davinci.ethosmedia.com>
Permalink:  ../web-107193@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-107193@davinci.ethosmedia.com

 · 

reply

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: josh@agliodbs.com, f_casadei@libero.it
  Subject: Re: Function returning an array
  In-Reply-To: <web-107193@davinci.ethosmedia.com>

* 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