1. 24 Sep, 2020 4 commits
  2. 23 Sep, 2020 4 commits
  3. 22 Sep, 2020 5 commits
  4. 21 Sep, 2020 4 commits
  5. 20 Sep, 2020 2 commits
  6. 19 Sep, 2020 3 commits
  7. 18 Sep, 2020 6 commits
  8. 17 Sep, 2020 12 commits
    • Tom Lane's avatar
      Remove support for postfix (right-unary) operators. · 1ed6b895
      Tom Lane authored
      This feature has been a thorn in our sides for a long time, causing
      many grammatical ambiguity problems.  It doesn't seem worth the
      pain to continue to support it, so remove it.
      
      There are some follow-on improvements we can make in the grammar,
      but this commit only removes the bare minimum number of productions,
      plus assorted backend support code.
      
      Note that pg_dump and psql continue to have full support, since
      they may be used against older servers.  However, pg_dump warns
      about postfix operators.  There is also a check in pg_upgrade.
      
      Documentation-wise, I (tgl) largely removed the "left unary"
      terminology in favor of saying "prefix operator", which is
      a more standard and IMO less confusing term.
      
      I included a catversion bump, although no initial catalog data
      changes here, to mark the boundary at which oprkind = 'r'
      stopped being valid in pg_operator.
      
      Mark Dilger, based on work by myself and Robert Haas;
      review by John Naylor
      
      Discussion: https://postgr.es/m/38ca86db-42ab-9b48-2902-337a0d6b8311@2ndquadrant.com
      1ed6b895
    • Tom Lane's avatar
      Remove factorial operators, leaving only the factorial() function. · 76f412ab
      Tom Lane authored
      The "!" operator is our only built-in postfix operator.  Remove it,
      on the way to removal of grammar support for postfix operators.
      
      There is also a "!!" prefix operator, but since it's been marked
      deprecated for most of its existence, we might as well remove it too.
      
      Also zap the SQL alias function numeric_fac(), which seems to have
      equally little reason to live.
      
      Mark Dilger, based on work by myself and Robert Haas;
      review by John Naylor
      
      Discussion: https://postgr.es/m/38ca86db-42ab-9b48-2902-337a0d6b8311@2ndquadrant.com
      76f412ab
    • Tom Lane's avatar
      Further improve pgindent's list of file exclusions. · 74d4608f
      Tom Lane authored
      I despair of people keeping the README file's notes in sync with
      the actual exclusion list, so move the notes into the exclusion file.
      Adjust the pgindent script to explicitly ignore comments in the file,
      just in case (though it's hard to believe any would match filenames).
      
      Extend the list so that it doesn't process any files we'd not wish it to
      even in a fully-built-out development directory.  (There are still a
      couple of derived files that it wants to reformat, but fixing the
      generator scripts for those seems like fit material for a separate patch.)
      
      Discussion: https://postgr.es/m/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com
      74d4608f
    • Tom Lane's avatar
      Improve common/logging.c's support for multiple verbosity levels. · 99175141
      Tom Lane authored
      Instead of hard-wiring specific verbosity levels into the option
      processing of client applications, invent pg_logging_increase_verbosity()
      and encourage clients to implement --verbose by calling that.  Then,
      the common convention that more -v's gets you more verbosity just works.
      
      In particular, this allows resurrection of the debug-grade messages that
      have long existed in pg_dump and its siblings.  They were unreachable
      before this commit due to lack of a way to select PG_LOG_DEBUG logging
      level.  (It appears that they may have been unreachable for some time
      before common/logging.c was introduced, too, so I'm not specifically
      blaming cc8d4151 for the oversight.  One reason for thinking that is
      that it's now apparent that _allocAH()'s message needs a null-pointer
      guard.  Testing might have failed to reveal that before 96bf88d5.)
      
      Discussion: https://postgr.es/m/1173106.1600116625@sss.pgh.pa.us
      99175141
    • Amit Kapila's avatar
      Update parallel BTree scan state when the scan keys can't be satisfied. · b7f2dd95
      Amit Kapila authored
      For parallel btree scan to work for array of scan keys, it should reach
      BTPARALLEL_DONE state once for every distinct combination of array keys.
      This is required to ensure that the parallel workers don't try to seize
      blocks at the same time for different scan keys. We missed to update this
      state when we discovered that the scan keys can't be satisfied.
      
      Author: James Hunter
      Reviewed-by: Amit Kapila
      Tested-by: Justin Pryzby
      Backpatch-through: 10, where it was introduced
      Discussion: https://postgr.es/m/4248CABC-25E3-4809-B4D0-128E1BAABC3C@amazon.com
      b7f2dd95
    • Peter Eisentraut's avatar
      Allow CURRENT_ROLE where CURRENT_USER is accepted · 45b98057
      Peter Eisentraut authored
      In the particular case of GRANTED BY, this is specified in the SQL
      standard.  Since in PostgreSQL, CURRENT_ROLE is equivalent to
      CURRENT_USER, and CURRENT_USER is already supported here, adding
      CURRENT_ROLE is trivial.  The other cases are PostgreSQL extensions,
      but for the same reason it also makes sense there.
      Reviewed-by: default avatarVik Fearing <vik@postgresfriends.org>
      Reviewed-by: default avatarAsif Rehman <asifr.rehman@gmail.com>
      Reviewed-by: default avatarAlvaro Herrera <alvherre@2ndquadrant.com>
      Discussion: https://www.postgresql.org/message-id/flat/f2feac44-b4c5-f38f-3699-2851d6a76dc9%402ndquadrant.com
      45b98057
    • Heikki Linnakangas's avatar
      Add support for building GiST index by sorting. · 16fa9b2b
      Heikki Linnakangas authored
      This adds a new optional support function to the GiST access method:
      sortsupport. If it is defined, the GiST index is built by sorting all data
      to the order defined by the sortsupport's comparator function, and packing
      the tuples in that order to GiST pages. This is similar to how B-tree
      index build works, and is much faster than inserting the tuples one by
      one. The resulting index is smaller too, because the pages are packed more
      tightly, upto 'fillfactor'. The normal build method works by splitting
      pages, which tends to lead to more wasted space.
      
      The quality of the resulting index depends on how good the opclass-defined
      sort order is. A good order preserves locality of the input data.
      
      As the first user of this facility, add 'sortsupport' function to the
      point_ops opclass. It sorts the points in Z-order (aka Morton Code), by
      interleaving the bits of the X and Y coordinates.
      
      Author: Andrey Borodin
      Reviewed-by: Pavel Borisov, Thomas Munro
      Discussion: https://www.postgresql.org/message-id/1A36620E-CAD8-4267-9067-FB31385E7C0D%40yandex-team.ru
      16fa9b2b
    • Michael Paquier's avatar
      doc: Apply more consistently <productname> markup for OpenSSL · 089da3c4
      Michael Paquier authored
      OpenSSL was quoted in inconsistent ways in many places of the docs,
      sometimes with <application>, <productname> or just nothing.
      
      Author: Daniel Gustafsson
      Discussion: https://postgr.es/m/DA91E5F0-5F9D-41A7-A7A6-B91CDE0F1D63@yesql.se
      089da3c4
    • Michael Paquier's avatar
      Improve tab completion of IMPORT FOREIGN SCHEMA in psql · 7307df16
      Michael Paquier authored
      It is not possible to get a list of foreign schemas as the server is not
      known, so this provides instead a list of local schemas, which is more
      useful than nothing if using a loopback server or having schema names
      matching in the local and remote servers.
      
      Author: Jeff Janes
      Reviewed-by: Tom Lane, Michael Paquier
      Discussion: https://postgr.es/m/CAMkU=1wr7Roj41q-XiJs=Uyc2xCmHhcGGy7J-peJQK-e+w=ghw@mail.gmail.com
      7307df16
    • Tom Lane's avatar
      Teach walsender to update its process title for replication commands. · babef40c
      Tom Lane authored
      Because the code path taken for SQL commands executed in a walsender
      will update the process title, we pretty much have to update the
      title for replication commands as well.  Otherwise, the title shows
      "idle" for the rest of a logical walsender's lifetime once it's
      executed any SQL command.
      
      Playing with this, I confirm that a walsender now typically spends
      most of its life reporting
      	walsender postgres [local] START_REPLICATION
      Considering this in isolation, it might be better to have it say
      	walsender postgres [local] sending replication data
      However, consistency with the other cases seems to be a stronger
      argument.
      
      In passing, remove duplicative pgstat_report_activity call.
      
      Discussion: https://postgr.es/m/880181.1600026471@sss.pgh.pa.us
      babef40c
    • Tom Lane's avatar
      Improve formatting of create_help.pl and plperl_opmask.pl output. · add10584
      Tom Lane authored
      Adjust the whitespace in the emitted files so that it matches
      what pgindent would do.  This makes the generated files look
      like they match project style, and avoids confusion if someone
      does run pgindent on the generated files.
      
      Also, add probes.h to pgindent's exclusion list, because it can
      confuse pgindent, plus there's not much point in processing it.
      
      Daniel Gustafsson, additional fixes by me
      
      Discussion: https://postgr.es/m/79ed5348-be7a-b647-dd40-742207186a22@2ndquadrant.com
      add10584
    • Alvaro Herrera's avatar
      Fix bogus completion tag usage in walsender · 07082b08
      Alvaro Herrera authored
      Since commit fd5942c1 (2012, 9.3-era), walsender has been sending
      completion tags for certain replication commands twice -- and they're
      not even consistent.  Apparently neither libpq nor JDBC have a problem
      with it, but it's not kosher.  Fix by remove the EndCommand() call in
      the common code path for them all, and inserting specific calls to
      EndReplicationCommand() specifically in those places where it's needed.
      
      EndReplicationCommand() is a new simple function to send the completion
      tag for replication commands.  Do this instead of sending a generic
      SELECT completion tag for them all, which was also pretty bogus (if
      innocuous).  While at it, change StartReplication() to use
      EndReplicationCommand() instead of pg_puttextmessage().
      
      In commit 2f966131, I failed to realize that replication commands
      are not close-enough kin of regular SQL commands, so the
      DROP_REPLICATION_SLOT tag I added is undeserved and a type pun.  Take it
      out.
      
      Backpatch to 13, where the latter commit appeared.  The duplicate tag
      has been sent since 9.3, but since nothing is broken, it doesn't seem
      worth fixing.
      
      Per complaints from Tom Lane.
      
      Discussion: https://postgr.es/m/1347966.1600195735@sss.pgh.pa.us
      07082b08