File tree 4 files changed +20
-7
lines changed
4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 1
1
# contrib/intagg/Makefile
2
2
3
3
EXTENSION = 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
5
5
6
6
ifdef USE_PGXS
7
7
PG_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 */
2
2
3
3
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4
4
\echo Use " CREATE EXTENSION intagg" to load this file. \quit
8
8
CREATE FUNCTION int_agg_state (internal, int4)
9
9
RETURNS internal
10
10
AS ' array_agg_transfn'
11
+ PARALLEL SAFE
11
12
LANGUAGE INTERNAL;
12
13
13
14
-- Internal function for the aggregate
14
15
-- Is called at the end of the aggregation, and returns an array.
15
16
CREATE FUNCTION int_agg_final_array (internal)
16
17
RETURNS int4[]
17
18
AS ' array_agg_finalfn'
19
+ PARALLEL SAFE
18
20
LANGUAGE INTERNAL;
19
21
20
22
-- The aggregate function itself
21
23
-- 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) (
24
25
SFUNC = int_agg_state,
25
26
STYPE = internal,
26
- FINALFUNC = int_agg_final_array
27
+ FINALFUNC = int_agg_final_array,
28
+ PARALLEL = SAFE
27
29
);
28
30
29
31
-- The enumeration function
@@ -32,4 +34,4 @@ CREATE AGGREGATE int_array_aggregate (
32
34
CREATE FUNCTION int_array_enum (int4[])
33
35
RETURNS setof integer
34
36
AS ' array_unnest'
35
- LANGUAGE INTERNAL IMMUTABLE STRICT;
37
+ LANGUAGE INTERNAL IMMUTABLE STRICT PARALLEL SAFE ;
Original file line number Diff line number Diff line change 1
1
# intagg extension
2
2
comment = 'integer aggregator and enumerator (obsolete)'
3
- default_version = '1.0 '
3
+ default_version = '1.1 '
4
4
relocatable = true
You can’t perform that action at this time.
0 commit comments