1. 16 Jul, 2014 1 commit
    • Tom Lane's avatar
      Allow join removal in some cases involving a left join to a subquery. · f15821ee
      Tom Lane authored
      We can remove a left join to a relation if the relation's output is
      provably distinct for the columns involved in the join clause (considering
      only equijoin clauses) and the relation supplies no variables needed above
      the join.  Previously, the join removal logic could only prove distinctness
      by reference to unique indexes of a table.  This patch extends the logic
      to consider subquery relations, wherein distinctness might be proven by
      reference to GROUP BY, DISTINCT, etc.
      
      We actually already had some code to check that a subquery's output was
      provably distinct, but it was hidden inside pathnode.c; which was a pretty
      bad place for it really, since that file is mostly boilerplate Path
      construction and comparison.  Move that code to analyzejoins.c, which is
      arguably a more appropriate location, and is certainly the site of the
      new usage for it.
      
      David Rowley, reviewed by Simon Riggs
      f15821ee
  2. 15 Jul, 2014 14 commits
  3. 14 Jul, 2014 10 commits
  4. 12 Jul, 2014 4 commits
    • Magnus Hagander's avatar
      Support --with-extra-version equivalent functionality in MSVC build · 8d9a0e85
      Magnus Hagander authored
      Adds a configuration parameter, extraver, that is appended to the
      version number when built.
      
      Michael Paquier, reviewed by Muhammad Asif Naeem
      8d9a0e85
    • Andres Freund's avatar
      Minimal psql tab completion support for SET search_path. · bd409519
      Andres Freund authored
      Complete SET search_path = ... to non-temporary and non-toast
      schemas. Since there pretty much is no use case to add those to the
      search path and there can be many it's helpful to exclude them.
      
      It'd be nicer to complete multiple search path elements, but that's
      not easy.
      
      Jeff Janes
      bd409519
    • Andres Freund's avatar
      Fix decoding of consecutive MULTI_INSERTs emitted by one heap_multi_insert(). · 626bfad6
      Andres Freund authored
      Commit 1b86c81d fixed the decoding of toasted columns for the rows
      contained in one xl_heap_multi_insert record. But that's not actually
      enough, because heap_multi_insert() will actually first toast all
      passed in rows and then emit several *_multi_insert records; one for
      each page it fills with tuples.
      
      Add a XLOG_HEAP_LAST_MULTI_INSERT flag which is set in
      xl_heap_multi_insert->flag denoting that this multi_insert record is
      the last emitted by one heap_multi_insert() call. Then use that flag
      in decode.c to only set clear_toast_afterwards in the right situation.
      
      Expand the number of rows inserted via COPY in the corresponding
      regression test to make sure that more than one heap page is filled
      with tuples by one heap_multi_insert() call.
      
      Backpatch to 9.4 like the previous commit.
      626bfad6
    • Magnus Hagander's avatar
      Add autocompletion of locale keywords for CREATE DATABASE · deee42ab
      Magnus Hagander authored
      Adds support for autocomplete of LC_COLLATE and LC_CTYPE to
      the CREATE DATABASE command in psql.
      deee42ab
  5. 11 Jul, 2014 2 commits
    • Tom Lane's avatar
      Fix bug with whole-row references to append subplans. · d6858148
      Tom Lane authored
      ExecEvalWholeRowVar incorrectly supposed that it could "bless" the source
      TupleTableSlot just once per query.  But if the input is coming from an
      Append (or, perhaps, other cases?) more than one slot might be returned
      over the query run.  This led to "record type has not been registered"
      errors when a composite datum was extracted from a non-blessed slot.
      
      This bug has been there a long time; I guess it escaped notice because when
      dealing with subqueries the planner tends to expand whole-row Vars into
      RowExprs, which don't have the same problem.  It is possible to trigger
      the problem in all active branches, though, as illustrated by the added
      regression test.
      d6858148
    • Peter Eisentraut's avatar
      Fix whitespace · 80ddd04b
      Peter Eisentraut authored
      80ddd04b
  6. 10 Jul, 2014 3 commits
    • Tom Lane's avatar
      Implement IMPORT FOREIGN SCHEMA. · 59efda3e
      Tom Lane authored
      This command provides an automated way to create foreign table definitions
      that match remote tables, thereby reducing tedium and chances for error.
      In this patch, we provide the necessary core-server infrastructure and
      implement the feature fully in the postgres_fdw foreign-data wrapper.
      Other wrappers will throw a "feature not supported" error until/unless
      they are updated.
      
      Ronan Dunklau and Michael Paquier, additional work by me
      59efda3e
    • Bruce Momjian's avatar
      Adjust blank lines around PG_MODULE_MAGIC defines, for consistency · 6a605cd6
      Bruce Momjian authored
      Report by Robert Haas
      6a605cd6
    • Fujii Masao's avatar
      Add new ECHO mode 'errors' that displays only failed commands in psql. · 5b214c5d
      Fujii Masao authored
      When the psql variable ECHO is set to 'erros', only failed SQL commands
      are printed to standard error output. Also this patch adds -b option into psql.
      This is equivalent to setting the variable ECHO to 'errors'.
      
      Pavel Stehule, reviewed by Fabrízio de Royes Mello, Samrat Revagade,
      Kumar Rajeev Rastogi, Abhijit Menon-Sen, and me.
      5b214c5d
  7. 09 Jul, 2014 3 commits
  8. 08 Jul, 2014 3 commits