postgres
jeremy_pg
前行
展开
-
Postgresql aggregate function sample
create the sfunc CREATE or replace FUNCTION uuid_set_intersect(uuid[], uuid[]) RETURNS uuid[] language plpgsql IMMUTABLE as $FUNCTION$ declare _r uuid[]; begin if $1 = '{00000000-0000-0000-...原创 2019-12-06 16:16:31 · 522 阅读 · 0 评论 -
Postgres 序列
Sequence Types Postgres中有以下几种序列类型, 但它们不是真正的类型。 smallserial serial bigserial 创建方式 CREATE TABLE tablename ( colname SERIAL ); 等价于 CREATE SEQUENCE tablename_colname_seq AS integer; CREATE TABLE tablena...原创 2019-11-08 15:11:12 · 218 阅读 · 0 评论