⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 int_aggregate.sql

📁 PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开发团队说,该版本将加速更多企业向该数据库移植.核心开发成员之一Bruce Momjian表示,在新版PostgreSQL
💻 SQL
字号:
-- Adjust this setting to control where the objects get created.SET search_path = public;-- Internal function for the aggregate-- Is called for each item in an aggregationCREATE OR REPLACE FUNCTION int_agg_state (int4[], int4)RETURNS int4[]AS '$libdir/int_aggregate','int_agg_state'LANGUAGE C;-- Internal function for the aggregate-- Is called at the end of the aggregation, and returns an array.CREATE OR REPLACE FUNCTION int_agg_final_array (int4[])RETURNS int4[]AS '$libdir/int_aggregate','int_agg_final_array'LANGUAGE C;-- The aggregate function itself-- uses the above functions to create an array of integers from an aggregation.CREATE AGGREGATE int_array_aggregate (	BASETYPE = int4,	SFUNC = int_agg_state,	STYPE = int4[],	FINALFUNC = int_agg_final_array);-- The enumeration function-- returns each element in a one dimensional integer array-- as a row.CREATE OR REPLACE FUNCTION int_array_enum(int4[])RETURNS setof integerAS '$libdir/int_aggregate','int_enum'LANGUAGE C IMMUTABLE STRICT;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -