Re: How to return ARRAY from SQL function?

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to return ARRAY from SQL function?
Date: 2019-06-26 11:30:31
Message-ID: CAADeyWiHPfZB+bJgqJ3B4qMv47ju6zPZwnzXJJoLAf_bSvjrag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you -

On Tue, Jun 18, 2019 at 3:10 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alexander Farber <alexander(dot)farber(at)gmail(dot)com> writes:
> > And then I shuffle the letters by -
>
> > CREATE OR REPLACE FUNCTION words_shuffle(in_array text[])
> > RETURNS text[] AS
> > $func$
> > SELECT array_agg(x ORDER BY RANDOM()) FROM UNNEST(in_array) x;
> > $func$ LANGUAGE sql STABLE;
>
> Hmm ... that's not really "stable", since it depends on random()
> which is volatile.
>
>
I was wondering that too, but assumed it is maybe STABLE because the
function does not modify any tables.

I will remove the STABLE keyword now

Regards
Alex

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hitesh Chadda 2019-06-26 13:42:07 migrating from Oracle to PostgreSQL 11
Previous Message Ahmed, Nawaz (Fuji Xerox Australia) 2019-06-26 07:00:04 RE: Max_connections limit