小编d9k*_*d9k的帖子

psql 9.5:gen_random_uuid() 不工作

SELECT gen_random_uuid()

产生输出

ERROR:  function gen_random_uuid() does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Run Code Online (Sandbox Code Playgroud)

CREATE EXTENSION pgcrypto;在选定的数据库上运行并SELECT gen_random_bytes(1)完美运行(gen_random_bytes不适用于pgcrypto未手动创建扩展的其他数据库)。

% psql --version
psql (PostgreSQL) 9.5.3
Run Code Online (Sandbox Code Playgroud)

Ubuntu 版本是 16.04。

pgcrypto postgresql-9.5 uuid

18
推荐指数
1
解决办法
3万
查看次数

标签 统计

pgcrypto ×1

postgresql-9.5 ×1

uuid ×1