pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Francesco Casadei <f_casadei@libero.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function returning an array
Date: Thu, 23 Aug 2001 13:07:17 -0400
Message-ID: <5905.998586437@sss.pgh.pa.us> (raw)
In-Reply-To: <web-107193@davinci.ethosmedia.com>
References: <web-107193@davinci.ethosmedia.com>

"Josh Berkus" <josh@agliodbs.com> writes:
>> What's the correct syntax to return two VARCHAR(255)?

> There isn't one.  At this time, functions cannot return arrays.

Well, they *can*, it's just that there's no syntax to support
constructing an array value in SQL or plpgsql languages.

I know that you can do it in pltcl (there are examples in the pltcl
self-test), and of course you can do it in C.  A brute-force solution
is to make a support function in one of those languages that takes two
varchars and returns an array of varchar.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <5905.998586437@sss.pgh.pa.us>
Permalink:  ../5905.998586437@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5905.998586437@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, josh@agliodbs.com, f_casadei@libero.it
  Subject: Re: Function returning an array
  In-Reply-To: <5905.998586437@sss.pgh.pa.us>

* 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