Re: gen_random_uuid() is immutable in Pg 13devel

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: depesz(at)depesz(dot)com, pgsql-bugs mailing list <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: gen_random_uuid() is immutable in Pg 13devel
Date: 2020-02-19 19:19:00
Message-ID: c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2020-02-18 19:54, hubert depesz lubaczewski wrote:
> Hi,
> I noticed that get_random_uuid() from pgcrypt is marked as immutable.
>
> Up to 12.2 it was volatile, and in 13 it became immutable.
>
> This leads to "interesting" change, that:
>
> select gen_random_uuid() from generate_series(1,10);
>
> returns 10 different uuids before 13, and 10 identical ones on 13devel.
>
> It looks that commit 5925e5549890416bcf588334d9d0bc99f8ad6c7f forgot to
> mark the function as volatile. Not sure if it was intentional.

Fixed, thanks.

It was indeed the result of confusion about the default value.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Allan Davis 2020-02-19 19:57:51 Re: postgres installation issue
Previous Message Ростик Шимчак 2020-02-19 19:05:16 postgres installation issue