系统安装扩展软件包
sudo dnf install postgresql12-contrib
数据库安装扩展
CREATE EXTENSION IF NOT EXISTS pgcrypto;
数据库使用函数生成UUID
select gen_random_uuid();
If you only need randomly-generated (version 4) UUIDs, consider using the
gen_random_uuid()
function from the pgcrypto module instead.
翻译:如果只需要随机生成的(版本4)UUID,请考虑改用pgcrypto模块中的gen_random_uuid()函数。
来源:oschina
链接:https://my.oschina.net/wffger/blog/3165492