From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | eike(dot)send(at)gmail(dot)com |
Subject: | gen_random_uuid is only available with pgcrypto enabled |
Date: | 2023-01-24 13:56:08 |
Message-ID: | 167456856827.2667301.17320033941826046414@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/functions-uuid.html
Description:
Regarding the documentation on this page:
https://www.postgresql.org/docs/15/functions-uuid.html
It think the documentation should state clearly, that postgres natively does
not have any UUID generation functions. You can use the `pgcrypto` or
`uuid-ossp` extensions though:
CREATE EXTENSION "pgcrypto"; /* enable pgcrypto extension */
SELECT public.gen_random_uuid(); /* -> uuid */
See https://www.postgresql.org/docs/current/pgcrypto.html#id-1.11.7.37.11
CREATE EXTENSION "uuid-ossp"; /* enable uuid-ossp extension */
SELECT public.uuid_generate_v4(); /* -> uuid */
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2023-01-24 17:16:59 | https://www.postgresql.org/account/comments/new/15/sql-alterdatabase.html/ |
Previous Message | jian he | 2023-01-23 14:12:51 | 9.7. Pattern Matching only a few links. |