Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-1192

Presence of function named 'sum' in a non public schema throws exception for create table in gpdb6

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • v1.14
    • All Modules
    • None

    Description

      • Greenplum version or build
        PostgreSQL 8.4.0 (Greenplum Database 6.0.0-alpha.0+dev.2546.ga5289153da build dev-oss)
      • Problem
        MADlib creates a function named sum in the madlib schema which throws an exception for create table. Note this only fails for gpdb6 and not for gpdb4/5 .
        This error was found by MADlib install-check tests. An issue has been opened on gpdb's github repository. https://github.com/greenplum-db/gpdb/issues/4185
      • Steps to reproduce the behavior
        createdb test
        psql test
        psql (8.4.0)
        Type "help" for help.
        test2=# select version();
                                                                                                                                 version
        
        -----------------------------------------------------------------------------------------------------------------------------------------------
        ----------------------------------------------------------------------------------------------------------
         PostgreSQL 8.4.0 (Greenplum Database 6.0.0-alpha.0+dev.2517.g5361041 build commit:5361041ddcdf3b696f726cf6c74ebc25cf8d873c-oss) on x86_64-pc-l
        inux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Dec 13 2017 17:15:14 (with assert checking)
        (1 row)
        
        test=# CREATE SCHEMA foo;
        CREATE FUNCTION foo.sum (
            a anyarray
        ) RETURNS anyarray AS $$
        BEGIN
             RETURN '{1,2,3}'::float8[];
        END
        $$ language plpgsql;
        
        set search_path=foo;
        CREATE TABLE bar AS SELECT  '{1,2,3}'::float8[] AS a, '{4,5,7}'::float8[] AS b;
        NOTICE:  Table doesn't have 'DISTRIBUTED BY' clause. Creating a NULL policy entry.
        ERROR:  function sum(real[]) is not unique
        LINE 1: select sum(gp_statistics_estimate_reltuples_relpages_oid(c.o...
                       ^
        HINT:  Could not choose a best candidate function. You might need to add explicit type casts.
        QUERY:  select sum(gp_statistics_estimate_reltuples_relpages_oid(c.oid))::float4[] from gp_dist_random('pg_class') c where c.oid=20262
        

      Attachments

        Activity

          People

            Unassigned Unassigned
            nikhilkak Nikhil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: