1. 14 Nov, 2017 3 commits
    • Tom Lane's avatar
      Rearrange c.h to create a "compiler characteristics" section. · 91aec93e
      Tom Lane authored
      Generalize section 1 to handle stuff that is principally about the
      compiler (not libraries), such as attributes, and collect stuff there
      that had been dropped into various other parts of c.h.  Also, push
      all the gettext macros into section 8, so that section 0 is really
      just inclusions rather than inclusions and random other stuff.
      
      The primary goal here is to get pg_attribute_aligned() defined before
      section 3, so that we can use it with int128.  But this seems like good
      cleanup anyway.
      
      This patch just moves macro definitions around, and shouldn't result
      in any changes in generated code.  But I'll push it out separately
      to see if the buildfarm agrees.
      
      Discussion: https://postgr.es/m/20171110185747.31519.28038@wrigleys.postgresql.org
      91aec93e
    • Tom Lane's avatar
      Document changes in large-object privilege checking. · 6d776522
      Tom Lane authored
      Commit 5ecc0d73 removed the hard-wired superuser checks in lo_import
      and lo_export in favor of protecting them with SQL permissions, but
      failed to adjust the documentation to match.  Fix that, and add a
      <caution> paragraph pointing out the nontrivial security hazards
      involved with actually granting such permissions.  (It's still better
      than ALLOW_DANGEROUS_LO_FUNCTIONS, though.)
      
      Also, commit ae20b23a caused large object read/write privilege to
      be checked during lo_open() rather than in the actual read or write
      calls.  Document that.
      
      Discussion: https://postgr.es/m/CAB7nPqRHmNOYbETnc_2EjsuzSM00Z+BWKv9sy6tnvSd5gWT_JA@mail.gmail.com
      6d776522
    • Alvaro Herrera's avatar
      Simplify index_[constraint_]create API · a61f5ab9
      Alvaro Herrera authored
      Instead of passing large swaths of boolean arguments, define some flags
      that can be used in a bitmask.  This makes it easier not only to figure
      out what each call site is doing, but also to add some new flags.
      
      The flags are split in two -- one set for index_create directly and
      another for constraints.  index_create() itself receives both, and then
      passes down the latter to index_constraint_create(), which can also be
      called standalone.
      
      Discussion: https://postgr.es/m/20171023151251.j75uoe27gajdjmlm@alvherre.pgsql
      Reviewed-by: Simon Riggs
      a61f5ab9
  2. 13 Nov, 2017 6 commits
  3. 12 Nov, 2017 2 commits
  4. 11 Nov, 2017 4 commits
  5. 10 Nov, 2017 6 commits
  6. 09 Nov, 2017 7 commits
  7. 08 Nov, 2017 6 commits
    • Tom Lane's avatar
      Allow --with-bonjour to work with non-macOS implementations of Bonjour. · 9b9cb3c4
      Tom Lane authored
      On macOS the relevant functions require no special library, but elsewhere
      we need to pull in libdns_sd.
      
      Back-patch to supported branches.  No docs change since the docs do not
      suggest that this is a Mac-only feature.
      
      Luke Lonergan
      
      Discussion: https://postgr.es/m/2D8331C5-D64F-44C1-8717-63EDC6EAF7EB@brightforge.com
      9b9cb3c4
    • Tom Lane's avatar
      Doc: fix erroneous example. · bd65e0c6
      Tom Lane authored
      The grammar requires these options to appear the other way 'round.
      
      jotpe@posteo.de
      
      Discussion: https://postgr.es/m/78933bd0-45ce-690e-b832-a328dd1a5567@posteo.de
      bd65e0c6
    • Tom Lane's avatar
      Fix two violations of the ResourceOwnerEnlarge/Remember protocol. · c5269472
      Tom Lane authored
      The point of having separate ResourceOwnerEnlargeFoo and
      ResourceOwnerRememberFoo functions is so that resource allocation
      can happen in between.  Doing it in some other order is just wrong.
      
      OpenTemporaryFile() did open(), enlarge, remember, which would leak the
      open file if the enlarge step ran out of memory.  Because fd.c has its own
      layer of resource-remembering, the consequences look like they'd be limited
      to an intratransaction FD leak, but it's still not good.
      
      IncrBufferRefCount() did enlarge, remember, incr-refcount, which would blow
      up if the incr-refcount step ever failed.  It was safe enough when written,
      but since the introduction of PrivateRefCountHash, I think the assumption
      that no error could happen there is pretty shaky.
      
      The odds of real problems from either bug are probably small, but still,
      back-patch to supported branches.
      
      Thomas Munro and Tom Lane, per a comment from Andres Freund
      c5269472
    • Peter Eisentraut's avatar
      Change TRUE/FALSE to true/false · 2eb4a831
      Peter Eisentraut authored
      The lower case spellings are C and C++ standard and are used in most
      parts of the PostgreSQL sources.  The upper case spellings are only used
      in some files/modules.  So standardize on the standard spellings.
      
      The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so
      those are left as is when using those APIs.
      
      In code comments, we use the lower-case spelling for the C concepts and
      keep the upper-case spelling for the SQL concepts.
      Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
      2eb4a831
    • Peter Eisentraut's avatar
      Put markup in the right place · 4497f2f3
      Peter Eisentraut authored
      4497f2f3
    • Peter Eisentraut's avatar
      Expand empty end tag · 6e1e4c0d
      Peter Eisentraut authored
      6e1e4c0d
  8. 07 Nov, 2017 6 commits