Skip to content
Snippets Groups Projects
  1. Mar 13, 2012
  2. 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
  3. Oct 06, 2011
    • Robert Haas's avatar
      Make pgstatindex respond to cancel interrupts. · 1cb018dd
      Robert Haas authored
      A similar problem for pgstattuple() was fixed in April of 2010 by commit
      33065ef8, but pgstatindex() seems to have
      been overlooked.
      
      Back-patch all the way, as with that commit, though not to 7.4 through
      8.1, since those are now EOL.
      1cb018dd
  4. Aug 25, 2011
    • Tom Lane's avatar
      Add a regression test for pgstattuple. · bd165757
      Tom Lane authored
      This is mainly to prove that the NaN fix actually works cross-platform.
      bd165757
    • Tom Lane's avatar
      Fix pgstatindex() to give consistent results for empty indexes. · af7d1812
      Tom Lane authored
      For an empty index, the pgstatindex() function would compute 0.0/0.0 for
      its avg_leaf_density and leaf_fragmentation outputs.  On machines that
      follow the IEEE float arithmetic standard with any care, that results in
      a NaN.  However, per report from Rushabh Lathia, Microsoft couldn't
      manage to get this right, so you'd get a bizarre error on Windows.
      
      Fix by forcing the results to be NaN explicitly, rather than relying on
      the division operator to give that or the snprintf function to print it
      correctly.  I have some doubts that this is really the most useful
      definition, but it seems better to remain backward-compatible with
      those platforms for which the behavior wasn't completely broken.
      
      Back-patch to 8.2, since the code is like that in all current releases.
      af7d1812
  5. Jul 04, 2011
  6. 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
  7. Jan 02, 2011
    • Robert Haas's avatar
      Basic foreign table support. · 0d692a0d
      Robert Haas authored
      Foreign tables are a core component of SQL/MED.  This commit does
      not provide a working SQL/MED infrastructure, because foreign tables
      cannot yet be queried.  Support for foreign table scans will need to
      be added in a future patch.  However, this patch creates the necessary
      system catalog structure, syntax support, and support for ancillary
      operations such as COMMENT and SECURITY LABEL.
      
      Shigeru Hanada, heavily revised by Robert Haas
      0d692a0d
  8. Sep 22, 2010
  9. Sep 20, 2010
  10. Apr 02, 2010
  11. Jun 11, 2009
  12. Apr 28, 2009
  13. Apr 01, 2009
  14. Jan 06, 2009
  15. Jun 19, 2008
  16. May 17, 2008
    • Andrew Dunstan's avatar
      Add $PostgreSQL$ markers to a lot of files that were missing them. · 53972b46
      Andrew Dunstan authored
      This particular batch was just for *.c and *.h file.
      
      The changes were made with the following 2 commands:
      
      find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *'
      
      find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
      53972b46
  17. May 16, 2008
  18. May 12, 2008
    • Alvaro Herrera's avatar
      Restructure some header files a bit, in particular heapam.h, by removing some · f8c4d7db
      Alvaro Herrera authored
      unnecessary #include lines in it.  Also, move some tuple routine prototypes and
      macros to htup.h, which allows removal of heapam.h inclusion from some .c
      files.
      
      For this to work, a new header file access/sysattr.h needed to be created,
      initially containing attribute numbers of system columns, for pg_dump usage.
      
      While at it, make contrib ltree, intarray and hstore header files more
      consistent with our header style.
      f8c4d7db
  19. Mar 26, 2008
  20. Mar 21, 2008
  21. Jan 14, 2008
  22. Nov 15, 2007
  23. Nov 13, 2007
  24. Nov 11, 2007
  25. Oct 22, 2007
  26. Sep 20, 2007
    • Tom Lane's avatar
      HOT updates. When we update a tuple without changing any of its indexed · 282d2a03
      Tom Lane authored
      columns, and the new version can be stored on the same heap page, we no longer
      generate extra index entries for the new version.  Instead, index searches
      follow the HOT-chain links to ensure they find the correct tuple version.
      
      In addition, this patch introduces the ability to "prune" dead tuples on a
      per-page basis, without having to do a complete VACUUM pass to recover space.
      VACUUM is still needed to clean up dead index entries, however.
      
      Pavan Deolasee, with help from a bunch of other people.
      282d2a03
  27. Sep 13, 2007
    • Tom Lane's avatar
      Redefine the lp_flags field of item pointers as having four states, rather · 68893035
      Tom Lane authored
      than two independent bits (one of which was never used in heap pages anyway,
      or at least hadn't been in a very long time).  This gives us flexibility to
      add the HOT notions of redirected and dead item pointers without requiring
      anything so klugy as magic values of lp_off and lp_len.  The state values
      are chosen so that for the states currently in use (pre-HOT) there is no
      change in the physical representation.
      68893035
  28. Aug 27, 2007
  29. Jul 16, 2007
  30. Jun 27, 2007
  31. Jun 07, 2007
  32. May 17, 2007
  33. May 03, 2007
Loading