1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Update /contrib for "autocommit TO 'on'".

Create objects in public schema.

Make spacing/capitalization consistent.

Remove transaction block use for object creation.

Remove unneeded function GRANTs.
This commit is contained in:
Bruce Momjian
2002-10-18 18:41:22 +00:00
parent fb9bc342ff
commit aa4c702eac
91 changed files with 3530 additions and 2643 deletions

View File

@ -1,28 +1,25 @@
-- Drop functions
drop aggregate int_array_aggregate(int4);
drop function int_agg_state (int4, int4);
drop function int_agg_final_array (int4);
drop function int_array_enum (int4[]);
-- Adjust this setting to control where the objects get created.
SET search_path = public;
SET autocommit TO 'on';
-- Internal function for the aggregate
-- Is called for each item in an aggregation
create function int_agg_state (int4, int4)
returns int4
as 'MODULE_PATHNAME','int_agg_state'
language 'c';
CREATE OR REPLACE FUNCTION int_agg_state (int4, int4)
RETURNS int4
AS 'MODULE_PATHNAME','int_agg_state'
LANGUAGE 'C';
-- Internal function for the aggregate
-- Is called at the end of the aggregation, and returns an array.
create function int_agg_final_array (int4)
returns int4[]
as 'MODULE_PATHNAME','int_agg_final_array'
language 'c';
CREATE OR REPLACE FUNCTION int_agg_final_array (int4)
RETURNS int4[]
AS 'MODULE_PATHNAME','int_agg_final_array'
LANGUAGE 'C';
-- The aggration funcion.
-- uses the above functions to create an array of integers from an aggregation.
create aggregate int_array_aggregate
(
CREATE OR REPLACE AGGREGATE int_array_aggregate (
BASETYPE = int4,
SFUNC = int_agg_state,
STYPE = int4,
@ -33,8 +30,7 @@ create aggregate int_array_aggregate
-- The enumeration function
-- returns each element in a one dimentional integer array
-- as a row.
create function int_array_enum(int4[])
returns setof integer
as 'MODULE_PATHNAME','int_enum'
language 'c';
CREATE OR REPLACE FUNCTION int_array_enum(int4[])
RETURNS setof integer
AS 'MODULE_PATHNAME','int_enum'
LANGUAGE 'C';