1. 02 5月, 2008 2 次提交
  2. 30 4月, 2008 1 次提交
  3. 29 4月, 2008 1 次提交
  4. 28 4月, 2008 1 次提交
  5. 27 4月, 2008 1 次提交
  6. 21 4月, 2008 1 次提交
    • T
      Allow float8, int8, and related datatypes to be passed by value on machines · 8472bf7a
      Tom Lane 提交于
      where Datum is 8 bytes wide.  Since this will break old-style C functions
      (those still using version 0 calling convention) that have arguments or
      results of these types, provide a configure option to disable it and retain
      the old pass-by-reference behavior.  Likewise, provide a configure option
      to disable the recently-committed float4 pass-by-value change.
      
      Zoltan Boszormenyi, plus configurability stuff by me.
      8472bf7a
  7. 20 4月, 2008 1 次提交
    • T
      Fix broken compare function for tsquery_ops. Per Tom's report. · be939544
      Teodor Sigaev 提交于
      I never understood why initial authors GiST in pgsql choose so
      stgrange signature for 'same' method:
      bool *sameFn(Datum a, Datum b, bool* result)
      instead of simple, logical
      bool sameFn(Datum a, Datum b)
      This change will break any existing GiST extension, so we still live with
      it and will live.
      be939544
  8. 19 4月, 2008 1 次提交
    • A
      Modify the float4 datatype to be pass-by-val. Along the way, remove the last · 7861d72e
      Alvaro Herrera 提交于
      uses of the long-deprecated float32 in contrib/seg; the definitions themselves
      are still there, but no longer used.  fmgr/README updated to match.
      
      I added a CREATE FUNCTION to account for existing seg_center() code in seg.c
      too, and some tests for it and the neighbor functions.  At the same time,
      remove checks for NULL which are not needed (because the functions are declared
      STRICT).
      
      I had to do some adjustments to contrib's btree_gist too.  The choices for
      representation there are not ideal for changing the underlying types :-(
      
      Original patch by Zoltan Boszormenyi, with some adjustments by me.
      7861d72e
  9. 18 4月, 2008 3 次提交
  10. 17 4月, 2008 1 次提交
    • T
      Fix LOAD_CRIT_INDEX() macro to take out AccessShareLock on the system index · 0f45d1eb
      Tom Lane 提交于
      it is trying to build a relcache entry for.  This is an oversight in my 8.2
      patch that tried to ensure we always took a lock on a relation before trying
      to build its relcache entry.  The implication is that if someone committed a
      reindex of a critical system index at about the same time that some other
      backend were starting up without a valid pg_internal.init file, the second one
      might PANIC due to not seeing any valid version of the index's pg_class row.
      Improbable case, but definitely not impossible.
      0f45d1eb
  11. 16 4月, 2008 1 次提交
  12. 15 4月, 2008 2 次提交
  13. 14 4月, 2008 1 次提交
    • T
      Since createplan.c no longer cares whether index operators are lossy, it has · 226837e5
      Tom Lane 提交于
      no particular need to do get_op_opfamily_properties() while building an
      indexscan plan.  Postpone that lookup until executor start.  This simplifies
      createplan.c a lot more than it complicates nodeIndexscan.c, and makes things
      more uniform since we already had to do it that way for RowCompare
      expressions.  Should be a bit faster too, at least for plans that aren't
      re-used many times, since we avoid palloc'ing and perhaps copying the
      intermediate list data structure.
      226837e5
  14. 13 4月, 2008 2 次提交
    • T
      Clean up a few places where Datums were being treated as pointers without · ba1c4630
      Tom Lane 提交于
      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
    • T
      Create new routines systable_beginscan_ordered, systable_getnext_ordered, · ec498cdc
      Tom Lane 提交于
      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
  15. 12 4月, 2008 2 次提交
    • T
      Add some debug support code to try to catch future mistakes in the area of · 65c3d05e
      Tom Lane 提交于
      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
    • T
      Fix several datatype input functions that were allowing unused bytes in their · c846f7ca
      Tom Lane 提交于
      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
  16. 09 4月, 2008 4 次提交
  17. 07 4月, 2008 1 次提交
    • P
      Implement a few changes to how shared libraries and dynamically loadable · 46e76373
      Peter Eisentraut 提交于
      modules are built.  Foremost, it creates a solid distinction between these two
      types of targets based on what had already been implemented and duplicated in
      ad hoc ways before.  Specifically,
      
      - Dynamically loadable modules no longer get a soname.  The numbers previously
      set in the makefiles were dummy numbers anyway, and the presence of a soname
      upset a few packaging tools, so it is nicer not to have one.
      
      - The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and
      then override the rule to install foo.so instead) is removed.
      
      - Lots of duplicated code simplified.
      46e76373
  18. 05 4月, 2008 3 次提交
  19. 04 4月, 2008 2 次提交
  20. 03 4月, 2008 3 次提交
    • M
      Oops, add proper #ifdef for systems without support for syslog. · f1e0d5a8
      Magnus Hagander 提交于
      Per buildfarm member mastodon.
      f1e0d5a8
    • M
      Convert syslog_facility guc to enum type. · 409e386b
      Magnus Hagander 提交于
      409e386b
    • T
      Revert my bad decision of about a year ago to make PortalDefineQuery · 1591fcbe
      Tom Lane 提交于
      responsible for copying the query string into the new Portal.  Such copying
      is unnecessary in the common code path through exec_simple_query, and in
      this case it can be enormously expensive because the string might contain
      a large number of individual commands; we were copying the entire, long
      string for each command, resulting in O(N^2) behavior for N commands.
      (This is the cause of bug #4079.)  A second problem with it is that
      PortalDefineQuery really can't risk error, because if it elog's before
      having set up the Portal, we will leak the plancache refcount that the
      caller is trying to hand off to the portal.  So go back to the design in
      which the caller is responsible for making sure everything is copied into
      the portal if necessary.
      1591fcbe
  21. 02 4月, 2008 1 次提交
  22. 01 4月, 2008 1 次提交
    • T
      Fix an oversight I made in a cleanup patch over a year ago: · 6b73d7e5
      Tom Lane 提交于
      eval_const_expressions needs to be passed the PlannerInfo ("root") structure,
      because in some cases we want it to substitute values for Param nodes.
      (So "constant" is not so constant as all that ...)  This mistake partially
      disabled optimization of unnamed extended-Query statements in 8.3: in
      particular the LIKE-to-indexscan optimization would never be applied if the
      LIKE pattern was passed as a parameter, and constraint exclusion depending
      on a parameter value didn't work either.
      6b73d7e5
  23. 31 3月, 2008 1 次提交
    • T
      Fix a number of places that were making file-type tests infelicitously. · c5f11f9d
      Tom Lane 提交于
      The places that did, eg,
      	(statbuf.st_mode & S_IFMT) == S_IFDIR
      were correct, but there is no good reason not to use S_ISDIR() instead,
      especially when that's what the other 90% of our code does.  The places
      that did, eg,
      	(statbuf.st_mode & S_IFDIR)
      were flat out *wrong* and would fail in various platform-specific ways,
      eg a symlink could be mistaken for a regular file on most Unixen.
      
      The actual impact of this is probably small, since the problem cases
      seem to always involve symlinks or sockets, which are unlikely to be
      found in the directories that PG code might be scanning.  But it's
      clearly trouble waiting to happen, so patch all the way back anyway.
      (There seem to be no occurrences of the mistake in 7.4.)
      c5f11f9d
  24. 28 3月, 2008 2 次提交
  25. 27 3月, 2008 1 次提交
    • T
      Reduce the need for frontend programs to include "postgres.h" by refactoring · 039dfbfd
      Tom Lane 提交于
      inclusions in src/include/catalog/*.h files.  The main idea here is to push
      function declarations for src/backend/catalog/*.c files into separate headers,
      rather than sticking them into the corresponding catalog definition file as
      has been done in the past.  This commit only carries out that idea fully for
      pg_proc, pg_type and pg_conversion, but that's enough for the moment ---
      if pg_list.h ever becomes unsafe for frontend code to include, we'll need
      to work a bit more.
      
      Zdenek Kotala
      039dfbfd