Re: How to return ARRAY from SQL function? - Mailing list pgsql-general

From Laurenz Albe
Subject Re: How to return ARRAY from SQL function?
Date
Msg-id fa667d56acfa4f4bd40556ddc1ef86e63a47a9dc.camel@cybertec.at
Whole thread Raw
In response to How to return ARRAY from SQL function?  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: How to return ARRAY from SQL function?
List pgsql-general
Alexander Farber wrote:
> But creating an SQL function fails -
> 
> words_ru=> CREATE OR REPLACE FUNCTION words_all_letters()
> words_ru->         RETURNS array AS
> words_ru-> $func$
> words_ru$>         SELECT ARRAY[...

"array" is not an existing data type.

You'll have to specify an array of which type you want, probably

 ... RETURNS text[]

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: How to return ARRAY from SQL function?
Next
From: Tom Lane
Date:
Subject: Re: How to return ARRAY from SQL function?