Skip to content
Snippets Groups Projects
  1. Nov 10, 2007
  2. Nov 09, 2007
  3. Nov 08, 2007
  4. Nov 06, 2007
    • Tom Lane's avatar
      Some code review for xml.c: · 5e512971
      Tom Lane authored
      Add some more xml_init() calls that might not be necessary, but seem like a
      good idea to avoid possible problems like we saw in xmlelement().
      Fix unsafe assumption that you can keep using the tupledesc of a relcache
      entry you don't have open.
      Add missing error checks for SearchSysCache failure.
      Get rid of handwritten array traversal in xpath() and O(N^2), broken-for-nulls
      array access code in map_sql_value_to_xml_value(), in favor of using
      deconstruct_array.
      Manually adjust a lot of line breaks in places where the code is otherwise
      gonna look pretty awful after pg_indent hacks it up (original author seems to
      have liked to lay out code for a 200-column window).
      5e512971
  5. Nov 05, 2007
    • Tom Lane's avatar
      Fix xmlelement() to initialize libxml correctly before using it, and to avoid · 85f807d7
      Tom Lane authored
      assuming that evaluation of its input expressions won't change the state of
      libxml.  This requires refactoring xml_init() to not call xmlInitParser(),
      since now not all of its callers want that.  I also tweaked things to avoid
      repeated execution of one-time-only tests inside xml_init(), though this is
      mostly for clarity rather than in hopes of saving any noticeable amount of
      runtime.  Per report from Sheikh Amjad and subsequent discussion.
      In passing, fix a couple of inadequately schema-qualified queries.
      85f807d7
  6. Oct 13, 2007
    • Tom Lane's avatar
      Guard against possible double free during error escape from XML · ff1de5ce
      Tom Lane authored
      functions.  Patch for the reported issue from Kris Jurka, some
      other potential trouble spots plugged by Tom.
      ff1de5ce
    • Tom Lane's avatar
      Fix the inadvertent libpq ABI breakage discovered by Martin Pitt: the · 8468146b
      Tom Lane authored
      renumbering of encoding IDs done between 8.2 and 8.3 turns out to break 8.2
      initdb and psql if they are run with an 8.3beta1 libpq.so.  For the moment
      we can rearrange the order of enum pg_enc to keep the same number for
      everything except PG_JOHAB, which isn't a problem since there are no direct
      references to it in the 8.2 programs anyway.  (This does force initdb
      unfortunately.)
      
      Going forward, we want to fix things so that encoding IDs can be changed
      without an ABI break, and this commit includes the changes needed to allow
      libpq's encoding IDs to be treated as fully independent of the backend's.
      The main issue is that libpq clients should not include pg_wchar.h or
      otherwise assume they know the specific values of libpq's encoding IDs,
      since they might encounter version skew between pg_wchar.h and the libpq.so
      they are using.  To fix, have libpq officially export functions needed for
      encoding name<=>ID conversion and validity checking; it was doing this
      anyway unofficially.
      
      It's still the case that we can't renumber backend encoding IDs until the
      next bump in libpq's major version number, since doing so will break the
      8.2-era client programs.  However the code is now prepared to avoid this
      type of problem in future.
      
      Note that initdb is no longer a libpq client: we just pull in the two
      source files we need directly.  The patch also fixes a few places that
      were being sloppy about checking for an unrecognized encoding name.
      8468146b
  7. Sep 23, 2007
  8. Jul 13, 2007
  9. Jul 12, 2007
  10. Jun 07, 2007
    • Tom Lane's avatar
      Fix up text concatenation so that it accepts all the reasonable cases that · 2d4db367
      Tom Lane authored
      were accepted by prior Postgres releases.  This takes care of the loose end
      left by the preceding patch to downgrade implicit casts-to-text.  To avoid
      breaking desirable behavior for array concatenation, introduce a new
      polymorphic pseudo-type "anynonarray" --- the added concatenation operators
      are actually text || anynonarray and anynonarray || text.
      2d4db367
  11. May 21, 2007
    • Peter Eisentraut's avatar
      XPath fixes: · 3963574d
      Peter Eisentraut authored
       - Function renamed to "xpath".
       - Function is now strict, per discussion.
       - Return empty array in case when XPath expression detects nothing
         (previously, NULL was returned in such case), per discussion.
       - (bugfix) Work with fragments with prologue: select xpath('/a',
         '<?xml version="1.0"?><a /><b />'); // now XML datum is always wrapped
         with dummy <x>...</x>, XML prologue simply goes away (if any).
       - Some cleanup.
      
      Nikolay Samokhvalov
      
      Some code cleanup and documentation work by myself.
      3963574d
  12. Apr 06, 2007
    • Tom Lane's avatar
      Support varlena fields with single-byte headers and unaligned storage. · 3e23b68d
      Tom Lane authored
      This commit breaks any code that assumes that the mere act of forming a tuple
      (without writing it to disk) does not "toast" any fields.  While all available
      regression tests pass, I'm not totally sure that we've fixed every nook and
      cranny, especially in contrib.
      
      Greg Stark with some help from Tom Lane
      3e23b68d
  13. Apr 05, 2007
  14. Apr 02, 2007
  15. Apr 01, 2007
  16. Mar 22, 2007
  17. Mar 16, 2007
    • Tom Lane's avatar
      Make use of plancache module for SPI plans. In particular, since plpgsql · 95f6d2d2
      Tom Lane authored
      uses SPI plans, this finally fixes the ancient gotcha that you can't
      drop and recreate a temp table used by a plpgsql function.
      
      Along the way, clean up SPI's API a little bit by declaring SPI plan
      pointers as "SPIPlanPtr" instead of "void *".  This is cosmetic but
      helps to forestall simple programming mistakes.  (I have changed some
      but not all of the callers to match; there are still some "void *"'s
      in contrib and the PL's.  This is intentional so that we can see if
      anyone's compiler complains about it.)
      95f6d2d2
  18. Mar 03, 2007
  19. Mar 01, 2007
  20. Feb 28, 2007
    • Tom Lane's avatar
      Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). · 234a02b2
      Tom Lane authored
      Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with
      VARSIZE and VARDATA, and as a consequence almost no code was using the
      longer names.  Rename the length fields of struct varlena and various
      derived structures to catch anyplace that was accessing them directly;
      and clean up various places so caught.  In itself this patch doesn't
      change any behavior at all, but it is necessary infrastructure if we hope
      to play any games with the representation of varlena headers.
      Greg Stark and Tom Lane
      234a02b2
  21. Feb 16, 2007
  22. Feb 13, 2007
  23. Feb 11, 2007
  24. Feb 10, 2007
  25. Feb 03, 2007
  26. Jan 27, 2007
  27. Jan 25, 2007
    • Peter Eisentraut's avatar
      Various fixes in the logic of XML functions: · 22bd156f
      Peter Eisentraut authored
      - Add new SQL command SET XML OPTION (also available via regular GUC) to
        control the DOCUMENT vs. CONTENT option in implicit parsing and
        serialization operations.
      
      - Subtle corrections in the handling of the standalone property in
        xmlroot().
      
      - Allow xmlroot() to work on content fragments.
      
      - Subtle corrections in the handling of the version property in
        xmlconcat().
      
      - Code refactoring for producing XML declarations.
      22bd156f
  28. Jan 24, 2007
  29. Jan 20, 2007
  30. Jan 19, 2007
  31. Jan 18, 2007
  32. Jan 14, 2007
Loading