1. 13 Apr, 2008 1 commit
    • Tom Lane's avatar
      Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops: · c22ed3d5
      Tom Lane authored
      the server version check is now always enforced.  Relax the version check to
      allow a server that is of pg_dump's own major version but a later minor
      version; this is the only case that -i was at all safe to use in.
      
      pg_restore already enforced only a very weak version check, so this is
      really just a documentation change for it.
      
      Per discussion.
      c22ed3d5
  2. 12 Apr, 2008 2 commits
    • Tom Lane's avatar
      Clean up a few places where Datums were being treated as pointers without · ba1c4630
      Tom Lane authored
      going through DatumGetPointer or some other "official" conversion macro.
      Not actually a bug, since Datum the same size as pointer is the only
      supported case at the moment, but good cleanup for the future.
      
      Gavin Sherry
      ba1c4630
    • Tom Lane's avatar
      Create new routines systable_beginscan_ordered, systable_getnext_ordered, · ec498cdc
      Tom Lane authored
      systable_endscan_ordered that have API similar to systable_beginscan etc
      (in particular, the passed-in scankeys have heap not index attnums),
      but guarantee ordered output, unlike the existing functions.  For the moment
      these are just very thin wrappers around index_beginscan/index_getnext/etc.
      Someday they might need to get smarter; but for now this is just a code
      refactoring exercise to reduce the number of direct callers of index_getnext,
      in preparation for changing that function's API.
      
      In passing, remove index_getnext_indexitem, which has been dead code for
      quite some time, and will have even less use than that in the presence
      of run-time-lossy indexes.
      ec498cdc
  3. 11 Apr, 2008 8 commits
    • Tom Lane's avatar
      A quick try at un-breaking the Cygwin build. Whether it needs the · 00832809
      Tom Lane authored
      pgwin32_safestat remains to be determined, but in any case the current
      code is not tolerable.
      00832809
    • Tom Lane's avatar
      Add some debug support code to try to catch future mistakes in the area of · 65c3d05e
      Tom Lane authored
      input functions that include garbage bytes in their results.  Provide a
      compile-time option RANDOMIZE_ALLOCATED_MEMORY to make palloc fill returned
      blocks with variable contents.  This option also makes the parser perform
      conversions of literal constants twice and compare the results, emitting a
      WARNING if they don't match.  (This is the code I used to catch the input
      function bugs fixed in the previous commit.)  For the moment, I've set it
      to be activated automatically by --enable-cassert.
      65c3d05e
    • Tom Lane's avatar
      Fix several datatype input functions that were allowing unused bytes in their · c846f7ca
      Tom Lane authored
      results to contain uninitialized, unpredictable values.  While this was okay
      as far as the datatypes themselves were concerned, it's a problem for the
      parser because occurrences of the "same" literal might not be recognized as
      equal by datumIsEqual (and hence not by equal()).  It seems sufficient to fix
      this in the input functions since the only critical use of equal() is in the
      parser's comparisons of ORDER BY and DISTINCT expressions.
      Per a trouble report from Marc Cousin.
      
      Patch all the way back.  Interestingly, array_in did not have the bug before
      8.2, which may explain why the issue went unnoticed for so long.
      c846f7ca
    • Bruce Momjian's avatar
      Update wording: · 00b1827a
      Bruce Momjian authored
      < * Allow functions to control the transaction state
      > * Allow calling of a procedure outside a SELECT that can control the
      >   transaction state
      00b1827a
    • Bruce Momjian's avatar
      Changed TODO wording: · accbddc9
      Bruce Momjian authored
      < * Support procedures, which return no value
      > * Allow functions to control the transaction state
      accbddc9
    • Bruce Momjian's avatar
      Add TODO: · 94255057
      Bruce Momjian authored
      > * Support procedures, which return no value
      >
      >   http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php
      94255057
    • Bruce Momjian's avatar
      Update URLs for dead space map. · a464dc07
      Bruce Momjian authored
      a464dc07
    • Bruce Momjian's avatar
      Fix main README typo. · 3fa352da
      Bruce Momjian authored
      Brendan Jurd
      3fa352da
  4. 10 Apr, 2008 7 commits
  5. 09 Apr, 2008 6 commits
  6. 08 Apr, 2008 3 commits
  7. 07 Apr, 2008 4 commits
  8. 06 Apr, 2008 2 commits
    • Tom Lane's avatar
      Make plpgsql support FOR over a query specified by a cursor declaration, · 347dd6a1
      Tom Lane authored
      for improved compatibility with Oracle.
      
      Pavel Stehule, with some fixes by me.
      347dd6a1
    • Tom Lane's avatar
      Improve hash_any() to use word-wide fetches when hashing suitably aligned · 26043592
      Tom Lane authored
      data.  This makes for a significant speedup at the cost that the results
      now vary between little-endian and big-endian machines; which forces us
      to add explicit ORDER BYs in a couple of regression tests to preserve
      machine-independent comparison results.  Also, force initdb by bumping
      catversion, since the contents of hash indexes will change (at least on
      big-endian machines).
      
      Kenneth Marshall and Tom Lane, based on work from Bob Jenkins.  This commit
      does not adopt Bob's new faster mix() algorithm, however, since we still need
      to convince ourselves that that doesn't degrade the quality of the hashing.
      26043592
  9. 05 Apr, 2008 5 commits
  10. 04 Apr, 2008 2 commits
    • Tom Lane's avatar
      Re-implement division for numeric values using the traditional "schoolbook" · a0fad976
      Tom Lane authored
      algorithm.  This is a good deal slower than our old roundoff-error-prone
      code for long inputs, so we keep the old code for use in the transcendental
      functions, where everything is approximate anyway.  Also create a
      user-accessible function div(numeric, numeric) to provide access to the
      exact result of trunc(x/y) --- since the regular numeric / operator will
      round off its result, simply computing that expression in SQL doesn't
      reliably give the desired answer.  This fixes bug #3387 and various related
      corner cases, and improves the usefulness of PG for high-precision integer
      arithmetic.
      a0fad976
    • Bruce Momjian's avatar
      Have psql command 'help' suggest the use of \?, updated version. · b6f0ad4b
      Bruce Momjian authored
      Greg Sabino Mullane
      b6f0ad4b