postgresql – 扩展名存在但uuid_generate_v4失败
发布时间:2020-12-13 16:27:37 所属栏目:百科 来源:网络整理
导读:在亚马逊ec2 RDS Postgresql: = SHOW rds.extensions;rds.extensions -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
在亚马逊ec2 RDS
Postgresql:
=> SHOW rds.extensions; rds.extensions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- btree_gin,btree_gist,chkpass,citext,cube,dblink,dict_int,dict_xsyn,earthdistance,fuzzystrmatch,hstore,intagg,intarray,isn,ltree,pgcrypto,pgrowlocks,pg_trgm,plperl,plpgsql,pltcl,postgis,postgis_tiger_geocoder,postgis_topology,sslinfo,tablefunc,tsearch2,unaccent,uuid-ossp (1 row) 你可以看到,uuid-ossp扩展名确实存在.但是,当我调用uuid_v4生成函数时,它会失败: CREATE TABLE my_table ( id uuid DEFAULT uuid_generate_v4() NOT NULL,name character varying(32) NOT NULL,); 这是怎么回事?
扩展名可用,但未安装在此数据库中.
CREATE EXTENSION "uuid-ossp"; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |