摘要: create or replace function random_string(integer) returns text as $body$ select array_to_string(array(select substring('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' FROM (ceil(r... 阅读全文
posted @ 2017-05-25 16:18 growthofmonkey 阅读(528) 评论(0) 推荐(0) 编辑
摘要: 本文总共介绍两种方法 : 1.使用create extension命令 安装扩展成功以后,就可以通过uuid_generate_v4()或uuid_generate_v1()查询 2.如果postgresql是默认安装的则是不带uuid函数的,为了生成一个uuid,我们可以在客户端生成。 在post 阅读全文
posted @ 2017-05-25 16:09 growthofmonkey 阅读(23574) 评论(1) 推荐(1) 编辑
摘要: --这里去创建一个function name为redpacket_data 里面包含三个变量 第一个为char类型 后面两个为bigint类型,下面的function中变量a1并没有用到,只是为了区分变量类型--for ii in .. loop end loop 为循环 create or replace function redpacket_data(a1 char(10), a2 bi... 阅读全文
posted @ 2017-05-25 14:15 growthofmonkey 阅读(1002) 评论(0) 推荐(0) 编辑