Re: gen_random_uuid() is immutable in Pg 13devel - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: gen_random_uuid() is immutable in Pg 13devel
Date
Msg-id 20200218190133.GA22454@alvherre.pgsql
Whole thread Raw
In response to gen_random_uuid() is immutable in Pg 13devel  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: gen_random_uuid() is immutable in Pg 13devel
List pgsql-bugs
On 2020-Feb-18, 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.

It seems an oversight to me.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-bugs by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: gen_random_uuid() is immutable in Pg 13devel
Next
From: PG Bug reporting form
Date:
Subject: BUG #16264: Server closed the connection unexpectedly