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