Skip to content
Snippets Groups Projects
  1. Feb 06, 2017
  2. Jan 03, 2017
  3. Nov 29, 2016
    • Tom Lane's avatar
      Test all contrib-created operator classes with amvalidate. · ade49c60
      Tom Lane authored
      I'd supposed that people would do this manually when creating new operator
      classes, but the folly of that was exposed today.  The tests seem fast
      enough that we can just apply them during the normal regression tests.
      
      contrib/isn fails the checks for lack of complete sets of cross-type
      operators.  That's a nice-to-have policy rather than a functional
      requirement, so leave it as-is, but insert ORDER BY in the query to
      ensure consistent cross-platform output.
      
      Discussion: https://postgr.es/m/7076.1480446837@sss.pgh.pa.us
      ade49c60
  4. Sep 30, 2016
  5. Jun 10, 2016
  6. Jun 07, 2016
  7. Jan 02, 2016
  8. Aug 03, 2015
  9. Aug 02, 2015
    • Heikki Linnakangas's avatar
      Fix output of ISBN-13 numbers beginning with 979. · cb3384a0
      Heikki Linnakangas authored
      An EAN beginning with 979 (but not 9790 - those are ISMN's) are accepted
      as ISBN numbers, but they cannot be represented in the old, 10-digit ISBN
      format. They must be output in the new 13-digit ISBN-13 format. We printed
      out an incorrect value for those.
      
      Also add a regression test, to test this and some other basic functionality
      of the module.
      
      Patch by Fabien Coelho. This fixes bug #13442, reported by B.Z. Backpatch
      to 9.1, where we started to recognize ISBN-13 numbers.
      cb3384a0
  10. May 20, 2015
    • Heikki Linnakangas's avatar
      Collection of typo fixes. · 4fc72cc7
      Heikki Linnakangas authored
      Use "a" and "an" correctly, mostly in comments. Two error messages were
      also fixed (they were just elogs, so no translation work required). Two
      function comments in pg_proc.h were also fixed. Etsuro Fujita reported one
      of these, but I found a lot more with grep.
      
      Also fix a few other typos spotted while grepping for the a/an typos.
      For example, "consists out of ..." -> "consists of ...". Plus a "though"/
      "through" mixup reported by Euler Taveira.
      
      Many of these typos were in old code, which would be nice to backpatch to
      make future backpatching easier. But much of the code was new, and I didn't
      feel like crafting separate patches for each branch. So no backpatching.
      4fc72cc7
  11. Jan 24, 2015
    • Tom Lane's avatar
      Replace a bunch more uses of strncpy() with safer coding. · 586dd5d6
      Tom Lane authored
      strncpy() has a well-deserved reputation for being unsafe, so make an
      effort to get rid of nearly all occurrences in HEAD.
      
      A large fraction of the remaining uses were passing length less than or
      equal to the known strlen() of the source, in which case no null-padding
      can occur and the behavior is equivalent to memcpy(), though doubtless
      slower and certainly harder to reason about.  So just use memcpy() in
      these cases.
      
      In other cases, use either StrNCpy() or strlcpy() as appropriate (depending
      on whether padding to the full length of the destination buffer seems
      useful).
      
      I left a few strncpy() calls alone in the src/timezone/ code, to keep it
      in sync with upstream (the IANA tzcode distribution).  There are also a
      few such calls in ecpg that could possibly do with more analysis.
      
      AFAICT, none of these changes are more than cosmetic, except for the four
      occurrences in fe-secure-openssl.c, which are in fact buggy: an overlength
      source leads to a non-null-terminated destination buffer and ensuing
      misbehavior.  These don't seem like security issues, first because no stack
      clobber is possible and second because if your values of sslcert etc are
      coming from untrusted sources then you've got problems way worse than this.
      Still, it's undesirable to have unpredictable behavior for overlength
      inputs, so back-patch those four changes to all active branches.
      586dd5d6
  12. Jan 06, 2015
  13. Aug 25, 2014
  14. Jul 14, 2014
  15. Jan 13, 2014
  16. Jan 07, 2014
  17. Jan 01, 2013
  18. Jan 02, 2012
  19. Dec 27, 2011
  20. Nov 17, 2011
  21. Oct 12, 2011
    • Tom Lane's avatar
      Throw a useful error message if an extension script file is fed to psql. · 458857cc
      Tom Lane authored
      We have seen one too many reports of people trying to use 9.1 extension
      files in the old-fashioned way of sourcing them in psql.  Not only does
      that usually not work (due to failure to substitute for MODULE_PATHNAME
      and/or @extschema@), but if it did work they'd get a collection of loose
      objects not an extension.  To prevent this, insert an \echo ... \quit
      line that prints a suitable error message into each extension script file,
      and teach commands/extension.c to ignore lines starting with \echo.
      That should not only prevent any adverse consequences of loading a script
      file the wrong way, but make it crystal clear to users that they need to
      do it differently now.
      
      Tom Lane, following an idea of Andrew Dunstan's.  Back-patch into 9.1
      ... there is not going to be much value in this if we wait till 9.2.
      458857cc
  22. Apr 11, 2011
  23. Apr 10, 2011
  24. Feb 14, 2011
    • Tom Lane's avatar
      Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. · 029fac22
      Tom Lane authored
      It was never terribly consistent to use OR REPLACE (because of the lack of
      comparable functionality for data types, operators, etc), and
      experimentation shows that it's now positively pernicious in the extension
      world.  We really want a failure to occur if there are any conflicts, else
      it's unclear what the extension-ownership state of the conflicted object
      ought to be.  Most of the time, CREATE EXTENSION will fail anyway because
      of conflicts on other object types, but an extension defining only
      functions can succeed, with bad results.
      029fac22
    • Tom Lane's avatar
      Convert contrib modules to use the extension facility. · 629b3af2
      Tom Lane authored
      This isn't fully tested as yet, in particular I'm not sure that the
      "foo--unpackaged--1.0.sql" scripts are OK.  But it's time to get some
      buildfarm cycles on it.
      
      sepgsql is not converted to an extension, mainly because it seems to
      require a very nonstandard installation process.
      
      Dimitri Fontaine and Tom Lane
      629b3af2
  25. Jan 01, 2011
  26. Nov 23, 2010
  27. Oct 20, 2010
  28. Sep 22, 2010
  29. Sep 20, 2010
  30. Feb 26, 2010
  31. Feb 05, 2010
  32. Jan 02, 2010
  33. Jun 11, 2009
  34. Jan 01, 2009
  35. Nov 30, 2008
    • Tom Lane's avatar
      Add a "LIKE = typename" clause to CREATE TYPE for base types. This allows · 3f936aac
      Tom Lane authored
      the basic representational details (typlen, typalign, typbyval, typstorage)
      to be copied from an existing type rather than listed explicitly in the
      CREATE TYPE command.  The immediate reason for this is to provide a simple
      solution for add-on modules that want to define types represented as int8,
      float4, or float8: as of 8.4 the appropriate PASSEDBYVALUE setting is
      platform-specific and so it's hard for a SQL script to know what to do.
      
      This patch fixes the contrib/isn breakage reported by Rushabh Lathia.
      3f936aac
  36. Nov 28, 2008
  37. Jan 01, 2008
  38. Nov 15, 2007
Loading