1. 06 9月, 2017 8 次提交
  2. 05 9月, 2017 8 次提交
  3. 04 9月, 2017 14 次提交
    • D
      Use GetOptions for options parsing in get_ereport · c637a0d0
      Daniel Gustafsson 提交于
      When adding the GPTest version printing it become clear that not
      only was the existing version printing broken, the options parsing
      was too. See sample execution below:
      
        ./get_ereport.pl -version
        Use of uninitialized value $ARGV[0] in pattern match (m//) at ./get_ereport.pl line 99.
        Missing argument in sprintf at ./get_ereport.pl line 163.
        ./get_ereport.pl version 0.
      
      So while in there, this commit fixes both. The options are now
      properly parsed with GetOptions() using pass_through and the version
      printed using the GPTest module.
      c637a0d0
    • D
      Move version printing to common module for Perl code · 7d64740b
      Daniel Gustafsson 提交于
      The perl code in src/test/regress was using a mix of either not
      printing the version, printing it wrong (due to us not using CVS
      anymore) or using a hardcoded string. Implement a new module for
      common test code called GPTest.pm which abstracts this (for now
      it's the only thing it does but this might/will change, hence the
      name). The module is created by autoconf to make it pull in the
      GP_VERSION from there.
      
      While there, simplify the version output in gpdiff which included
      the version of the system diff command - somewhat uninteresting
      information as it's not something that changes very often and just
      cluttered up the output.
      
      This removes the MakeMaker support but since we have no intention
      of packaging these programs into a CPAN module it seems pointless
      to carry that format around.
      7d64740b
    • D
      Refactor Greenplum specific testcode to a new file · 01304a76
      Daniel Gustafsson 提交于
      regress.c is an upstream file, and all Greenplum additions can
      cause conflicts as we merge with PostgreSQL. This refactors all
      GPDB specific code into a new file, regress_gp.c, to keep the
      upstream file as close to upstream as possible (with backports).
      The new file gets compiled and loaded just like regress.c, so
      no change in how it works.
      
      Also remove an unused function, perform rudimentary codereview
      on the Greenplum tests and massage regress.c slightly to make
      it closer to upstream.
      01304a76
    • X
      Refactor copy's target segment computing function · 36f2f6d6
      Xiaoran Wang 提交于
      There are same codes computing target segment in both function CopyFrom
      and CopyFromDispatch. Extract the codes into separate functions.
      Signed-off-by: NXiaoran Wang <xiwang@pivotal.io>
      36f2f6d6
    • H
      Share external URL-mapping code between planner and ORCA. · cbb8ea18
      Heikki Linnakangas 提交于
      Planner and ORCA translator both implemented the same logic, to assign
      external table URIs to segments. But I spotted one case where the logic
      differed:
      
      CREATE EXTERNAL TABLE exttab_with_on_master( i int, j text )
      LOCATION ('file://@hostname@@abs_srcdir@/data/exttab_few_errors.data') ON MASTER FORMAT 'TEXT' (DELIMITER '|');
      
      SELECT * FROM exttab_with_on_master;
      ERROR:  'ON MASTER' is not supported by this protocol yet.
      
      With ORCA you got a less user-friendly error:
      
      set optimizer=on;
      set optimizer_enable_master_only_queries = on;
      postgres=# explain SELECT * FROM exttab_with_on_master;
      ERROR:  External scan error: Could not assign a segment database for external file (CTranslatorDXLToPlStmt.cpp:472)
      
      The immediate cause of that was that commit fcf82234 didn't remember to
      modify the ORCA translator's copy of the same logic. But really, it's silly
      and error-prone to duplicate the code, so modify ORCA to use the same code
      that the planner does.
      cbb8ea18
    • H
      Further refactoring of ParseFuncOrColumn and func_get_detail. · 5a7563cc
      Heikki Linnakangas 提交于
      This backports the new FUNCDETAIL_WINDOWFUNC return code from PostgreSQL
      8.4, and refactors the code to match upstream, as much as feasible. A few
      error scenarios now give better error messages.
      5a7563cc
    • D
      Fix typo in copy.c comment · 102aac6f
      Daniel Gustafsson 提交于
      102aac6f
    • H
      Replace custom expandable buffer implementation with StringInfo. · 38f354aa
      Heikki Linnakangas 提交于
      Simpler that way.
      38f354aa
    • H
      Replace redundant functions with contain_window_function() from PG 8.4 · 232ecfc3
      Heikki Linnakangas 提交于
      We don't need two different functions to check whether an expression
      contains a window function. Replace both with the variant used in
      the upstream, contain_window_function().
      232ecfc3
    • H
      Cherry-pick locate_windowfunc() from PostgreSQL 8.4. · 3fc342d6
      Heikki Linnakangas 提交于
      This allows having error positions for more syntax errors, and reduces
      the diff footprint of our window functions implementation against the
      one in PostgreSQL 8.4.
      3fc342d6
    • X
      Handle the failure in AssignResGroupOnMaster() · 931d5d57
      xiong-gang 提交于
      As AssignResGroupOnMaster() is called before the transaction is
      actually started, so the failure won't cause transaction abort,
      we need handle the error to prevent slot leaking.
      Signed-off-by: NZhenghua Lyu <zlv@pivotal.io>
      931d5d57
    • H
      Cosmetic fixes, to reduce diff vs upstream. · 74fdbc5d
      Heikki Linnakangas 提交于
      Most notably, move the definition of XmlExpr and friends to where they are
      in the upstream.
      74fdbc5d
    • H
      Rename checkExprHasWindFuncs to checkExprHasWindowFuncs to match upstream. · e94a339a
      Heikki Linnakangas 提交于
      Also move the function to where it is in the upstream.
      
      To reduce our diff footprint.
      e94a339a
    • H
      Remove overly-complicated SzAllocate function. · 4212fdad
      Heikki Linnakangas 提交于
      There was only one caller, and it provided no memory pool. The fault
      injection was also unused AFAICS.
      4212fdad
  4. 03 9月, 2017 8 次提交
  5. 02 9月, 2017 2 次提交