在amazon ec2 RDS Postgresql上:
=>;显示rds.extensions;
rds.extensions
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
btree_gin,btree_gist,chkpass,citext,cube,dblink,dict_int,dict_xsyn,earthdistance,fuzzystormach,hstore,intagg,intarray,isn,ltree,pgcrypto,pgrowlocks,pg_trgm,plperl,plpgsql,pltcl,postgis,postgis_tiger_地理编码器,postgis_拓扑,sslinfo,tablefunc,tsearch,ts2,uncent,uid ossp
(1排)
如您所见,uuid-ossp扩展确实存在。但是,当我调用生成uuid\u v4的函数时,它失败了:
创建表格我的表格(
id uuid默认uuid_generate_v4()不为空,
名称字符变化(32)不为空,
);
这个怎么了
扩展名可用,但未在此数据库中安装
如果不存在,则创建扩展“uuid ossp”;