File tree Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 11# contrib/intagg/Makefile
22
33EXTENSION = intagg
4- DATA = intagg--1.0 .sql intagg--unpackaged--1.0.sql
4+ DATA = intagg--1.1.sql intagg--1.0--1.1 .sql intagg--unpackaged--1.0.sql
55
66ifdef USE_PGXS
77PG_CONFIG = pg_config
Original file line number Diff line number Diff line change 1+ /* contrib/intagg/intagg--1.0--1.1.sql */
2+
3+ -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+ \echo Use " ALTER EXTENSION intagg UPDATE TO '1.1'" to load this file. \quit
5+
6+ ALTER FUNCTION int_agg_state(internal, int4) PARALLEL SAFE;
7+ ALTER FUNCTION int_agg_final_array(internal) PARALLEL SAFE;
8+ ALTER FUNCTION int_array_enum(int4[]) PARALLEL SAFE;
9+
10+ UPDATE pg_proc SET proparallel = ' s'
11+ WHERE oid = ' int_array_aggregate(int4)' ::regprocedure;
Original file line number Diff line number Diff line change 1- /* contrib/intagg/intagg--1.0 .sql */
1+ /* contrib/intagg/intagg--1.1 .sql */
22
33-- complain if script is sourced in psql, rather than via CREATE EXTENSION
44\echo Use " CREATE EXTENSION intagg" to load this file. \quit
88CREATE FUNCTION int_agg_state (internal, int4)
99RETURNS internal
1010AS ' array_agg_transfn'
11+ PARALLEL SAFE
1112LANGUAGE INTERNAL;
1213
1314-- Internal function for the aggregate
1415-- Is called at the end of the aggregation, and returns an array.
1516CREATE FUNCTION int_agg_final_array (internal)
1617RETURNS int4[]
1718AS ' array_agg_finalfn'
19+ PARALLEL SAFE
1820LANGUAGE INTERNAL;
1921
2022-- The aggregate function itself
2123-- uses the above functions to create an array of integers from an aggregation.
22- CREATE AGGREGATE int_array_aggregate (
23- BASETYPE = int4,
24+ CREATE AGGREGATE int_array_aggregate (int4) (
2425 SFUNC = int_agg_state,
2526 STYPE = internal,
26- FINALFUNC = int_agg_final_array
27+ FINALFUNC = int_agg_final_array,
28+ PARALLEL = SAFE
2729);
2830
2931-- The enumeration function
@@ -32,4 +34,4 @@ CREATE AGGREGATE int_array_aggregate (
3234CREATE FUNCTION int_array_enum (int4[])
3335RETURNS setof integer
3436AS ' array_unnest'
35- LANGUAGE INTERNAL IMMUTABLE STRICT;
37+ LANGUAGE INTERNAL IMMUTABLE STRICT PARALLEL SAFE ;
Original file line number Diff line number Diff line change 11# intagg extension
22comment = 'integer aggregator and enumerator (obsolete)'
3- default_version = '1.0 '
3+ default_version = '1.1 '
44relocatable = true
You can’t perform that action at this time.
0 commit comments