1. 24 May, 2018 7 commits
    • Tom Lane's avatar
      Update sepgsql regression test output for getObjectDescription() changes. · f248453b
      Tom Lane authored
      Missed in commit b86b7bfa.  Per buildfarm.
      f248453b
    • Tom Lane's avatar
      Improve English wording of some other getObjectDescription() messages. · b86b7bfa
      Tom Lane authored
      Print columns as "column C of <relation>" rather than "<relation> column
      C".  This seems to read noticeably better in English, as evidenced by the
      regression test output changes, and the code change also makes it possible
      for translators to adjust the phrase order in other languages.
      
      Also change the output for OCLASS_DEFAULT from "default for %s" to
      "default value for %s".  This seems to read better and is also more
      consistent with the output of, for instance, getObjectTypeDescription().
      
      Kyotaro Horiguchi, per a complaint from me
      
      Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
      b86b7bfa
    • Tom Lane's avatar
      Improve translatability of some getObjectDescription() messages. · 7c89eb75
      Tom Lane authored
      Refactor some cases in getObjectDescription so that the translator has
      more control over phrase order in the translated messages.  This doesn't
      cause any changes in the English results.  (I was sorely tempted to
      reorder "... belonging to role %s in schema %s" into "... in schema %s
      belonging to role %s", but refrained.)
      
      In principle we could back-patch this, but since translators have not
      complained about these cases previously, it seems better not to thrash
      the translatable strings in back branches.
      
      Kyotaro Horiguchi, tweaked a bit by me
      
      Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
      7c89eb75
    • Tom Lane's avatar
      Fix objectaddress.c code for publication relations. · 1a31baf6
      Tom Lane authored
      getObjectDescription and getObjectIdentity failed to schema-qualify
      the name of the published table, which is bad in getObjectDescription and
      unforgivable in getObjectIdentity.  Actually, getObjectIdentity failed to
      emit the table's name at all unless "objname" output is requested, which
      accidentally works for some (all?) extant callers but is clearly not the
      intended API.  Somebody had also not gotten the memo that the output of
      getObjectIdentity is not to be translated.
      
      To fix getObjectDescription, I made it call getRelationDescription, which
      required refactoring the translatable string for the case, but is more
      future-proof in case we ever publish relations that aren't plain tables.
      While at it, I made the English output look like "publication of table X
      in publication Y"; the added "of" seems to me to make it read much better.
      
      Back-patch to v10 where publications were introduced.
      
      Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
      1a31baf6
    • Tom Lane's avatar
      Properly schema-qualify additional object types in getObjectDescription(). · 056f52d9
      Tom Lane authored
      Collations, conversions, extended statistics objects (in >= v10),
      and all four types of text search objects have schema-qualified names.
      getObjectDescription() ignored that and would emit just the base name of
      the object, potentially producing wrong or at least highly misleading
      output.  Fix it to add the schema name whenever the object is not "visible"
      in the current search path, as is the rule for other schema-qualifiable
      object types.
      
      Although in common situations the output won't change, this seems to me
      (tgl) to be a bug worthy of back-patching, hence do so.
      
      Kyotaro Horiguchi, per a complaint from me
      
      Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
      056f52d9
    • Andrew Dunstan's avatar
      Preserve information on use of git-external-diff · 4431c94c
      Andrew Dunstan authored
      Now that the Working with git wiki page no longer suggests producing
      context diffs, we should preserve the information on how to use
      git-external-diff for those people who want to view context format
      diffs. The most obvious place is in the script itself, so that's what's
      done here.
      4431c94c
    • Bruce Momjian's avatar
      doc: PG 11 rel notes: add PL/pgSQL composite DDL item · 0c7e6b79
      Bruce Momjian authored
      Reported-by: Tom Lane
      0c7e6b79
  2. 23 May, 2018 7 commits
    • Tom Lane's avatar
      Fix simple_prompt() to disable echo on Windows when stdin != terminal. · 50485b3e
      Tom Lane authored
      If echo = false, simple_prompt() is supposed to prevent echoing the
      input (for password input).  However, the Windows implementation applied
      the mode change to STD_INPUT_HANDLE.  That would not have the desired
      effect if stdin isn't actually the terminal, for instance if the user
      is piping something into psql.  Fix it to apply the mode change to
      the correct input file, so that passwords do not echo in such cases.
      
      In passing, shorten and de-uglify this code by using #elif rather than
      an #if nest and removing some duplicated code.
      
      Back-patch to all supported versions.  To simplify that, also back-patch
      the portions of commit 9daec77e that got rid of an unnecessary
      malloc/free in the same area.
      
      Matthew Stickney (cosmetic changes by me)
      
      Discussion: https://postgr.es/m/502a1fff-862b-da52-1031-f68df6ed5a2d@gmail.com
      50485b3e
    • Tom Lane's avatar
      Remove configure's check for nonstandard "long long" printf modifiers. · b929614f
      Tom Lane authored
      We used to claim to support platforms using 'q' or 'I64' as the printf
      length modifier for long long int, by dint of replacing snprintf with
      our own code which uses the C99 standard 'll' modifier.  But that is
      only adequate if we use INT64_MODIFIER only in snprintf-based calls,
      not directly with the platform's native printf or fprintf.  Which
      hasn't been the case for years.  We had not noticed, partially because
      of inadequate test coverage, and partially because the buildfarm is
      almost completely bare of machines that won't take 'll'.  The last
      one seems to have been frogmouth, which was adjusted recently so that
      it will take 'll'.  We might as well just give up on the pretense
      that anything else works, and save ourselves some configure cycles.
      
      Discussion: https://postgr.es/m/13103.1526749980@sss.pgh.pa.us
      Discussion: https://postgr.es/m/24769.1526772680@sss.pgh.pa.us
      b929614f
    • Tom Lane's avatar
      Fix incorrect ordering of operations in pg_resetwal and pg_rewind. · 1d96c1b9
      Tom Lane authored
      Commit c37b3d08 dropped its added GetDataDirectoryCreatePerm call into
      the wrong place in pg_resetwal.c, namely after the chdir to DataDir.
      That broke invocations using a relative path, as reported by Tushar Ahuja.
      We could have left it where it was and changed the argument to be ".",
      but that'd result in a rather confusing error message in event of a
      failure, so re-ordering seems like a better solution.
      
      Similarly reorder operations in pg_rewind.c.  The issue there is that
      it doesn't seem like a good idea to do any actual operations before the
      not-root check (on Unix) or the restricted token acquisition (on Windows).
      I don't know that this is an actual bug, but I'm definitely not convinced
      that it isn't, either.
      
      Assorted other code review for c37b3d08 and da9b580d: fix some
      misspelled or otherwise badly worded comments, put the #include for
      <sys/stat.h> where it actually belongs, etc.
      
      Discussion: https://postgr.es/m/aeb9c3a7-3c3f-a57f-1a18-c8d4fcdc2a1f@enterprisedb.com
      1d96c1b9
    • Heikki Linnakangas's avatar
      Accept "B" in all memory-unit GUCs, and improve error messages. · b06d8e58
      Heikki Linnakangas authored
      Commit 6e7baa32 added support for "B" unit, for specifying config options
      in bytes. However, it was only accepted in GUC_UNIT_BYTE settings,
      wal_segment_size and track_activity_query_size, and not e.g. in work_mem.
      This patch makes it consistent, so that "B" accepted in all the same
      contexts where "kB", "MB", and so forth are accepted.
      
      Add "B" to the list of accepted units in the error hint, along with "kB",
      "MB", etc.
      
      Add an entry in the conversion table for "TB" to "B" conversion. A terabyte
      is out of range for any GUC_UNIT_BYTE option, so you always get an "out of
      range" error with that, but without it, you get a confusing error message
      that claims that "TB" is not an accepted unit, with a hint that nevertheless
      lists "TB" as an accepted unit.
      
      Reviewed-by: Alexander Korotkov, Andres Freund
      Discussion: https://www.postgresql.org/message-id/1bfe7f4a-7e22-aa6e-7b37-f4d222ed2d67@iki.fi
      b06d8e58
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      doc: PG 11 release notes, add third author · fd287b46
      Bruce Momjian authored
      fd287b46
    • Bruce Momjian's avatar
      9490c2da
  3. 22 May, 2018 3 commits
  4. 21 May, 2018 14 commits
  5. 20 May, 2018 2 commits
  6. 19 May, 2018 4 commits
  7. 18 May, 2018 3 commits