pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Francesco Casadei <f_casadei@libero.it>
To: pgsql-sql@postgresql.org
Subject: Function returning an array
Date: Thu, 23 Aug 2001 16:58:30 +0200
Message-ID: <20010823165830.A2359@goku.kasby> (raw)

I want a function to return an array of two VARCHAR(255).

This works, but does not return VARCHAR(255):
CREATE FUNCTION ins_div(CHAR(8))
RETURNS _varchar
AS '...'
LANGUAGE 'plpgsql';

These don't work:
CREATE FUNCTION ins_div(CHAR(8))
RETURNS _varchar(255)
AS '...'
LANGUAGE 'plpgsql';

CREATE FUNCTION ins_div(CHAR(8))
RETURNS varchar(255)[2]
AS '...'
LANGUAGE 'plpgsql';

CREATE FUNCTION ins_div(CHAR(8))
RETURNS varchar[2](255)
AS '...'
LANGUAGE 'plpgsql';

CREATE FUNCTION ins_div(CHAR(8))
RETURNS setof varchar(255)
AS '..'
LANGUAGE 'plpgsql';

What's the correct syntax to return two VARCHAR(255)?

	Francesco Casadei




view thread (4+ messages)  latest in thread

Message-ID: <20010823165830.A2359@goku.kasby>
Permalink:  ../20010823165830.A2359@goku.kasby/
Also on:    postgresql.org/message-id/20010823165830.A2359@goku.kasby

 · 

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: f_casadei@libero.it
  Subject: Re: Function returning an array
  In-Reply-To: <20010823165830.A2359@goku.kasby>

* 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