Github user iyerr3 commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/57#discussion_r71447310
  
    --- 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 --
    
    I'm confused about this change and why we even need this function. Older 
versions of GPDB did not have array_agg (since they were based on PG 8.3) and 
needed this function. All currently supported platforms have this 
functionality. I realize 9.5 also supports array_agg(anyarray), but this 
function was not intended to provide that feature. 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to