提交 476ceb9c 编写于 作者: A Ashwin Agrawal

Use uniform strategy to accommodate GPDB changes to pg_proc.h

Some functions if had different return type or argument compared to upstream,
were modified with comment in pg_proc.h while few were moved completely to
pg_proc.sql. This difference causes confusion while merging and having single
consistent method for all would be better. So, with this commit now upstream
functions would be defined in pg_proc.h irrespective if there definitions differ
from upstream or not.

Note:
pg_proc.h is used for all upstream definitions and pg_proc.sql is used to
auto-generate gpdb added functions in Greenplum.
上级 0492a052
......@@ -2388,14 +2388,18 @@ DATA(insert OID = 1832 ( float8_stddev_samp PGNSP PGUID 12 1 0 0 f f f t f i 1
DESCR("aggregate final function");
DATA(insert OID = 1833 ( numeric_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 1700" _null_ _null_ _null_ _null_ numeric_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
/* GPDB: numeric_avg_accum is moved to pg_proc.sql */
/* GPDB: numeric_avg_accum first arg and rettype changed from _numeric (1231) to bytea (17) */
DATA(insert OID = 2858 ( numeric_avg_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 17 "17 1700" _null_ _null_ _null_ _null_ numeric_avg_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
DATA(insert OID = 1834 ( int2_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 21" _null_ _null_ _null_ _null_ int2_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
DATA(insert OID = 1835 ( int4_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 23" _null_ _null_ _null_ _null_ int4_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
DATA(insert OID = 1836 ( int8_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 20" _null_ _null_ _null_ _null_ int8_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
/* GPDB: int8_avg_accum is moved to pg_proc.sql */ // GPDB_91_MERGE_FIXME: Why?
/* GPDB: int8_avg_accum first arg and rettype changed from _numeric (1231) to bytea (17) */
DATA(insert OID = 2746 ( int8_avg_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 17 "17 20" _null_ _null_ _null_ _null_ int8_avg_accum _null_ _null_ _null_ ));
DESCR("aggregate transition function");
/* GPDB: numeric_avg arg changed from _numeric (1231) to bytea (17) */
DATA(insert OID = 1837 ( numeric_avg PGNSP PGUID 12 1 0 0 f f f t f i 1 0 1700 "17" _null_ _null_ _null_ _null_ numeric_avg _null_ _null_ _null_ ));
DESCR("aggregate final function");
......
......@@ -58,9 +58,7 @@
CREATE FUNCTION interval_bound(timestamptz, "interval", int4, timestamptz) RETURNS timestamptz LANGUAGE internal IMMUTABLE AS 'timestamptz_interval_bound_shift_reg' WITH (OID=7090, DESCRIPTION="boundary of the interval containing the given value");
-- Aggregate-related functions
CREATE FUNCTION numeric_avg_accum(bytea, "numeric") RETURNS bytea LANGUAGE internal IMMUTABLE STRICT AS 'numeric_avg_accum' WITH (OID=4102, DESCRIPTION="aggregate transition function");
-- Aggregate-related functions
CREATE FUNCTION numeric_decum(_numeric, "numeric") RETURNS _numeric LANGUAGE internal IMMUTABLE STRICT AS 'numeric_decum' WITH (OID=7309, DESCRIPTION="aggregate inverse transition function");
CREATE FUNCTION numeric_avg_decum(bytea, "numeric") RETURNS bytea LANGUAGE internal IMMUTABLE STRICT AS 'numeric_avg_decum' WITH (OID=4103, DESCRIPTION="aggregate inverse transition function");
......@@ -79,8 +77,6 @@
CREATE FUNCTION interval_decum(_interval, "interval") RETURNS _interval LANGUAGE internal IMMUTABLE STRICT AS 'interval_decum' WITH (OID=6038, DESCRIPTION="aggregate inverse transition function");
CREATE FUNCTION int8_avg_accum(bytea, int8) RETURNS bytea LANGUAGE internal IMMUTABLE STRICT AS 'int8_avg_accum' WITH (OID=4100, DESCRIPTION="AVG(int8) transition function");
CREATE FUNCTION int2_avg_decum(bytea, int2) RETURNS bytea LANGUAGE internal IMMUTABLE STRICT AS 'int2_avg_decum' WITH (OID=6019, DESCRIPTION="AVG(int2) transition function");
CREATE FUNCTION int4_avg_decum(bytea, int4) RETURNS bytea LANGUAGE internal IMMUTABLE STRICT AS 'int4_avg_decum' WITH (OID=6020, DESCRIPTION="AVG(int4) transition function");
......
......@@ -22,7 +22,7 @@
WARNING: DO NOT MODIFY THE FOLLOWING SECTION:
Generated by catullus.pl version 8
on Mon Mar 19 14:34:37 2018
on Mon Jun 25 18:03:46 2018
Please make your changes in pg_proc.sql
*/
......@@ -147,11 +147,7 @@ DATA(insert OID = 7090 ( interval_bound PGNSP PGUID 12 1 0 0 f f f f f i 4 0 11
DESCR("boundary of the interval containing the given value");
/* Aggregate-related functions */
/* numeric_avg_accum(bytea, "numeric") => bytea */
DATA(insert OID = 4102 ( numeric_avg_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 17 "17 1700" _null_ _null_ _null_ _null_ numeric_avg_accum _null_ _null_ _null_ n a ));
DESCR("aggregate transition function");
/* Aggregate-related functions */
/* numeric_decum(_numeric, "numeric") => _numeric */
DATA(insert OID = 7309 ( numeric_decum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1231 "1231 1700" _null_ _null_ _null_ _null_ numeric_decum _null_ _null_ _null_ n a ));
DESCR("aggregate inverse transition function");
......@@ -188,10 +184,6 @@ DESCR("SUM(int8) inverse transition function");
DATA(insert OID = 6038 ( interval_decum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1187 "1187 1186" _null_ _null_ _null_ _null_ interval_decum _null_ _null_ _null_ n a ));
DESCR("aggregate inverse transition function");
/* int8_avg_accum(bytea, int8) => bytea */
DATA(insert OID = 4100 ( int8_avg_accum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 17 "17 20" _null_ _null_ _null_ _null_ int8_avg_accum _null_ _null_ _null_ n a ));
DESCR("AVG(int8) transition function");
/* int2_avg_decum(bytea, int2) => bytea */
DATA(insert OID = 6019 ( int2_avg_decum PGNSP PGUID 12 1 0 0 f f f t f i 2 0 17 "17 21" _null_ _null_ _null_ _null_ int2_avg_decum _null_ _null_ _null_ n a ));
DESCR("AVG(int2) transition function");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册