Github user snaga commented on a diff in the pull request: https://github.com/apache/incubator-madlib/pull/57#discussion_r71436485 --- Diff: methods/array_ops/src/pg_gp/array_ops.sql_in --- @@ -602,11 +602,22 @@ m4_ifdef(`__HAS_FUNCTION_PROPERTIES__', `NO SQL', `'); * in later GPDB and Postgres versions. */ DROP AGGREGATE IF EXISTS MADLIB_SCHEMA.array_agg(anyelement) CASCADE; -CREATE AGGREGATE MADLIB_SCHEMA.array_agg( anyelement) ( - SFUNC = array_append, - STYPE = anyarray - m4_ifdef( `__POSTGRESQL__', `', `, PREFUNC = array_cat') -); +DO $$ +BEGIN + -- + -- array_agg() compatibility function is only needed PostgreSQL 9.4 or earlier + -- because 9.5 or later has pg_catalog.array_agg(anyarray). + -- + IF regexp_replace(version(), '.*PostgreSQL (\d+\.\d+).*', '\1')::float8 < 9.5 THEN --- End diff -- @decibel Looks better. Will replace with it. Thanks!
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---