当前位置:网站首页>postgres uuid_ generate_ v1() does not exist
postgres uuid_ generate_ v1() does not exist
2022-04-21 07:23:00 【Landscape Shepherd】
Catalog
1. install uuid-ossp Extended dependency environment
One 、 The phenomenon :
schema=# select uuid_generate_v1();
ERROR: function uuid_generate_v1() does not exist
The first 1 That's ok select uuid_generate_v1();
^
Tips : No function matches the given name and argument types. You might need to add explicit type casts.
Time :14.543 ms
Two 、 reason :
By default ,postgres It's not uuid_generate_v1 Methodical , You need to install extensions , And enable it uuid-ossp Before you can use this method .
3、 ... and 、 resolvent :
1. install uuid-ossp Extended dependency environment
You can use compilation or installation Yum install , Because my environment here is Postgres10,yum install , So... Is preferred yum Install the extension .
yum install -y postgresql10-contrib
2. Enable uuid-ossp Expand
postgres=# create extension "uuid-ossp" ;
CREATE EXTENSION
3. verification
postgres-# \dx
List of installed extensions
name | edition | Architecture mode | describe
-----------+------+------------+-------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
uuid-ossp | 1.1 | public | generate universally unique identifiers (UUIDs)
More details
postgres=# \dx+
Object is used to extend "plpgsql"
Object description
---------------------------------------
function plpgsql_call_handler()
function plpgsql_inline_handler(internal)
function plpgsql_validator(oid)
Language plpgsql
(4 rows )
Object is used to extend "uuid-ossp"
Object description
----------------------------------
function uuid_generate_v1()
function uuid_generate_v1mc()
function uuid_generate_v3(uuid,text)
function uuid_generate_v4()
function uuid_generate_v5(uuid,text)
function uuid_nil()
function uuid_ns_dns()
function uuid_ns_oid()
function uuid_ns_url()
function uuid_ns_x500()
(10 rows )
Re execution
postgres=# select uuid_generate_v1();
uuid_generate_v1
--------------------------------------
9ffd8cc8-db44-11eb-8952-0050568a41b8
(1 rows )
版权声明
本文为[Landscape Shepherd]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210619114181.html
边栏推荐
猜你喜欢

图形学基础|抗锯齿(Anti-Aliasing)

Implémenter un tableau en tant que fonction JS. Prototype. Foreach (),. Map (),. Filtre ()

Guaba and Computational Geometry

Micro Service -- service splitting strategy and principle

数据库——《对数据进行排序》

The difference between on and where followed by conditions in the left join association table

WordPress地址siteurl错误 无法登录的解决方法

格式检查工具eslint

Could not initialize cudnn ,please check cudnn installation.
Fundamentals of graphics | cartoon shadow map based on SDF
随机推荐
HLOJ 1936 铺满方格
虚幻引擎之使用LoadClass加载蓝图类
Micro Service -- service splitting strategy and principle
Oracle使用dbms_crypto实现MD5值计算
dpdk 问题分析:dpdk-20.11 ice 100G 网卡 rss_hash 配置无效问题
Data heterogeneity scheme
云计算中网络基础知识
【LeetCode 202】快乐数
验证码的生成
PowerShell 执行策略 about_Execution_Policies
CF515B Drazil and His Happy Friends题解
Implémenter un tableau en tant que fonction JS. Prototype. Foreach (),. Map (),. Filtre ()
pg 数据库不能使用 zh_CN.UTF-8:initdb: error: locale “zh_CN.UTF-8“ requires unsupported encoding “GBK“
图形学基础|抗锯齿(Anti-Aliasing)
C语言版:二叉树的静态建立
WordPress插件-Easy WP SMTP
读书笔记-精进 如何成为一个很厉害的人
用JS函数形式实现一个Array.prototype.forEach(),.map(),.filter()
“华为杯“ 武汉大学21级新生程序设计竞赛 J.传闻档案
【LeetCode 383】赎金信