Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Date
Msg-id CAJ7c6TNh20kD8yR42Qi+o63Du8DfPU3TZaD5vVDxfrL=fYVNPw@mail.gmail.com
Whole thread Raw
In response to Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions  (Aleksander Alekseev <aleksander@tigerdata.com>)
List pgsql-hackers
Hi,

> > Updated patch attaced.
>
> Perhaps bytea_uuid() should check the UUID format. Consider the
> following example:
>
> SELECT uuid_extract_version('\x019a2f859cedffffb99d9c55044a2563'::bytea::uuid);

On the flip side we allow this:

=# select '019a2f85-9ced-ffff-b99d-9c55044a2563' :: uuid;
                 uuid
--------------------------------------
 019a2f85-9ced-ffff-b99d-9c55044a2563

So I guess the patch is fine.

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Avoid overwiriting cache entry (src/backend/utils/cache/relcache.c)
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions