pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: depesz@depesz.com, pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Subject: Re: gen_random_uuid() is immutable in Pg 13devel
Date: Wed, 19 Feb 2020 20:19:00 +0100
Message-ID: <c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com> (raw)
In-Reply-To: <20200218185452.GA8710@depesz.com>
References: <20200218185452.GA8710@depesz.com>

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





view thread (8+ messages)  latest in thread

Message-ID: <c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com>
Permalink:  ../c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com/
Also on:    postgresql.org/message-id/c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com
  Subject: Re: gen_random_uuid() is immutable in Pg 13devel
  In-Reply-To: <c8c67581-bf88-5b26-c1ec-bd9ada9bb650@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox