Skip to content
Snippets Groups Projects
  1. Jun 21, 2017
    • Tom Lane's avatar
      Phase 3 of pgindent updates. · 382ceffd
      Tom Lane authored
      Don't move parenthesized lines to the left, even if that means they
      flow past the right margin.
      
      By default, BSD indent lines up statement continuation lines that are
      within parentheses so that they start just to the right of the preceding
      left parenthesis.  However, traditionally, if that resulted in the
      continuation line extending to the right of the desired right margin,
      then indent would push it left just far enough to not overrun the margin,
      if it could do so without making the continuation line start to the left of
      the current statement indent.  That makes for a weird mix of indentations
      unless one has been completely rigid about never violating the 80-column
      limit.
      
      This behavior has been pretty universally panned by Postgres developers.
      Hence, disable it with indent's new -lpl switch, so that parenthesized
      lines are always lined up with the preceding left paren.
      
      This patch is much less interesting than the first round of indent
      changes, but also bulkier, so I thought it best to separate the effects.
      
      Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
      Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
      382ceffd
  2. May 17, 2017
  3. Mar 21, 2017
  4. Mar 15, 2017
    • Stephen Frost's avatar
      Add support for EUI-64 MAC addresses as macaddr8 · c7a9fa39
      Stephen Frost authored
      This adds in support for EUI-64 MAC addresses by adding a new data type
      called 'macaddr8' (using our usual convention of indicating the number
      of bytes stored).
      
      This was largely a copy-and-paste from the macaddr data type, with
      appropriate adjustments for having 8 bytes instead of 6 and adding
      support for converting a provided EUI-48 (6 byte format) to the EUI-64
      format.  Conversion from EUI-48 to EUI-64 inserts FFFE as the 4th and
      5th bytes but does not perform the IPv6 modified EUI-64 action of
      flipping the 7th bit, but we add a function to perform that specific
      action for the user as it may be commonly done by users who wish to
      calculate their IPv6 address based on their network prefix and 48-bit
      MAC address.
      
      Author: Haribabu Kommi, with a good bit of rework of macaddr8_in by me.
      Reviewed by: Vitaly Burovoy, Kuntal Ghosh
      
      Discussion: https://postgr.es/m/CAJrrPGcUi8ZH+KkK+=TctNQ+EfkeCEHtMU_yo1mvX8hsk_ghNQ@mail.gmail.com
      c7a9fa39
  5. 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
  6. Jul 21, 2016
    • Tom Lane's avatar
      Make contrib regression tests safe for Danish locale. · d70d1191
      Tom Lane authored
      In btree_gin and citext, avoid some not-particularly-interesting
      dependencies on the sorting of 'aa'.  In tsearch2, use COLLATE "C" to
      remove an uninteresting dependency on locale sort order (and thereby
      allow removal of a variant expected-file).
      
      Also, in citext, avoid assuming that lower('I') = 'i'.  This isn't relevant
      to Danish but it does fail in Turkish.
      d70d1191
  7. Jul 17, 2016
    • Peter Eisentraut's avatar
      Use correct symbol for minimum int64 value · f36ca9af
      Peter Eisentraut authored
      The old code used SEQ_MINVALUE to get the smallest int64 value.  This
      was done as a convenience to avoid having to deal with INT64_IS_BUSTED,
      but that is obsolete now.  Also, it is incorrect because the smallest
      int64 value is actually SEQ_MINVALUE-1.  Fix by using PG_INT64_MIN.
      f36ca9af
  8. May 24, 2015
  9. May 15, 2015
    • Alvaro Herrera's avatar
      Move strategy numbers to include/access/stratnum.h · 26df7066
      Alvaro Herrera authored
      For upcoming BRIN opclasses, it's convenient to have strategy numbers
      defined in a single place.  Since there's nothing appropriate, create
      it.  The StrategyNumber typedef now lives there, as well as existing
      strategy numbers for B-trees (from skey.h) and R-tree-and-friends (from
      gist.h).  skey.h is forced to include stratnum.h because of the
      StrategyNumber typedef, but gist.h is not; extensions that currently
      rely on gist.h for rtree strategy numbers might need to add a new
      
      A few .c files can stop including skey.h and/or gist.h, which is a nice
      side benefit.
      
      Per discussion:
      https://www.postgresql.org/message-id/20150514232132.GZ2523@alvh.no-ip.org
      
      Authored by Emre Hasegeli and Álvaro.
      
      (It's not clear to me why bootscanner.l has any #include lines at all.)
      26df7066
  10. Mar 31, 2015
  11. Mar 25, 2015
  12. Dec 22, 2014
  13. Aug 25, 2014
  14. Jul 14, 2014
  15. Apr 18, 2014
    • Peter Eisentraut's avatar
      Create function prototype as part of PG_FUNCTION_INFO_V1 macro · e7128e8d
      Peter Eisentraut authored
      Because of gcc -Wmissing-prototypes, all functions in dynamically
      loadable modules must have a separate prototype declaration.  This is
      meant to detect global functions that are not declared in header files,
      but in cases where the function is called via dfmgr, this is redundant.
      Besides filling up space with boilerplate, this is a frequent source of
      compiler warnings in extension modules.
      
      We can fix that by creating the function prototype as part of the
      PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway.  That
      makes the code of modules cleaner, because there is one less place where
      the entry points have to be listed, and creates an additional check that
      functions have the right prototype.
      
      Remove now redundant prototypes from contrib and other modules.
      e7128e8d
  16. 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
  17. Sep 01, 2011
  18. Apr 25, 2011
    • Peter Eisentraut's avatar
      Support "make check" in contrib · f8ebe3bc
      Peter Eisentraut authored
      Added a new option --extra-install to pg_regress to arrange installing
      the respective contrib directory into the temporary installation.
      This is currently not yet supported for Windows MSVC builds.
      
      Updated the .gitignore files for contrib modules to ignore the
      leftovers of a temp-install check run.
      
      Changed the exit status of "make check" in a pgxs build (which still
      does nothing) to 0 from 1.
      
      Added "make check" in contrib to top-level "make check-world".
      f8ebe3bc
  19. Apr 23, 2011
    • Tom Lane's avatar
      De-kludge contrib/btree_gin for collations. · 474ff212
      Tom Lane authored
      Using DEFAULT_COLLATION_OID in the comparePartial functions was not only
      a lame hack, but outright wrong, because the compare functions for
      collation-aware types were already responding to the declared index
      collation.  So comparePartial would have the wrong expectation about
      the index's sort order, possibly leading to missing matches for prefix
      searches.
      474ff212
  20. Apr 13, 2011
    • Tom Lane's avatar
      Pass collations to functions in FunctionCallInfoData, not FmgrInfo. · d64713df
      Tom Lane authored
      Since collation is effectively an argument, not a property of the function,
      FmgrInfo is really the wrong place for it; and this becomes critical in
      cases where a cached FmgrInfo is used for varying purposes that might need
      different collation settings.  Fix by passing it in FunctionCallInfoData
      instead.  In particular this allows a clean fix for bug #5970 (record_cmp
      not working).  This requires touching a bit more code than the original
      method, but nobody ever thought that collations would not be an invasive
      patch...
      d64713df
  21. 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
  22. Feb 08, 2011
    • Peter Eisentraut's avatar
      Per-column collation support · 414c5a2e
      Peter Eisentraut authored
      This adds collation support for columns and domains, a COLLATE clause
      to override it per expression, and B-tree index support.
      
      Peter Eisentraut
      reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
      414c5a2e
  23. Jan 09, 2011
  24. Nov 23, 2010
  25. Sep 22, 2010
  26. Sep 20, 2010
  27. Jan 07, 2010
  28. Aug 04, 2009
  29. Jun 11, 2009
  30. Mar 26, 2009
Loading