Skip to content
Snippets Groups Projects
  1. Jan 02, 2016
  2. Apr 29, 2015
    • Robert Haas's avatar
      Remove enum-related special cases for catalog scans. · 9b6a0ce5
      Robert Haas authored
      When this code was written, catalog scans were normally performed using
      SnapshotNow, making special handling necessary here.  Now, however, all
      catalog scans use MVCC snapshots, so we can change these cases to look
      more like what we do for catalog scans elsewhere in the code.
      
      Per discussion with Tom Lane and a reminder from Bruce Momjian.
      9b6a0ce5
  3. Jan 06, 2015
  4. Jan 07, 2014
  5. Feb 13, 2013
    • Tom Lane's avatar
      Fix CVE-2013-0255 properly. · 71627f3d
      Tom Lane authored
      Revert commit ab0f7b60 (in HEAD only)
      in favor of the proper solution, which is to declare enum_recv() correctly
      in the system catalogs.  It should be declared to take type "internal"
      not "cstring".
      
      Also improve the type_sanity regression test, which should have caught
      this typo, so that it actually would.  Most of the relevant checks on
      the signature of type I/O functions should not have been restricted to
      basetypes/pseudotypes, as they should apply to any type's I/O functions.
      71627f3d
  6. Feb 04, 2013
    • Tom Lane's avatar
      Prevent execution of enum_recv() from SQL. · ab0f7b60
      Tom Lane authored
      This function was misdeclared to take cstring when it should take internal.
      This at least allows crashing the server, and in principle an attacker
      might be able to use the function to examine the contents of server memory.
      
      The correct fix is to adjust the system catalog contents (and fix the
      regression tests that should have caught this but failed to).  However,
      asking users to correct the catalog contents in existing installations
      is a pain, so as a band-aid fix for the back branches, install a check
      in enum_recv() to make it throw error if called with a cstring argument.
      We will later revert this in HEAD in favor of correcting the catalogs.
      
      Our thanks to Sumit Soni (via Secunia SVCRP) for reporting this issue.
      
      Security: CVE-2013-0255
      ab0f7b60
  7. Jan 01, 2013
  8. Aug 30, 2012
    • Alvaro Herrera's avatar
      Split tuple struct defs from htup.h to htup_details.h · c219d9b0
      Alvaro Herrera authored
      This reduces unnecessary exposure of other headers through htup.h, which
      is very widely included by many files.
      
      I have chosen to move the function prototypes to the new file as well,
      because that means htup.h no longer needs to include tupdesc.h.  In
      itself this doesn't have much effect in indirect inclusion of tupdesc.h
      throughout the tree, because it's also required by execnodes.h; but it's
      something to explore in the future, and it seemed best to do the htup.h
      change now while I'm busy with it.
      c219d9b0
  9. Jan 02, 2012
  10. Sep 04, 2011
    • Tom Lane's avatar
      Clean up the #include mess a little. · 1609797c
      Tom Lane authored
      walsender.h should depend on xlog.h, not vice versa.  (Actually, the
      inclusion was circular until a couple hours ago, which was even sillier;
      but Bruce broke it in the expedient rather than logically correct
      direction.)  Because of that poor decision, plus blind application of
      pgrminclude, we had a situation where half the system was depending on
      xlog.h to include such unrelated stuff as array.h and guc.h.  Clean up
      the header inclusion, and manually revert a lot of what pgrminclude had
      done so things build again.
      
      This episode reinforces my feeling that pgrminclude should not be run
      without adult supervision.  Inclusion changes in header files in particular
      need to be reviewed with great care.  More generally, it'd be good if we
      had a clearer notion of module layering to dictate which headers can sanely
      include which others ... but that's a big task for another day.
      1609797c
  11. Sep 01, 2011
  12. Apr 10, 2011
  13. Jan 01, 2011
  14. Oct 25, 2010
  15. Sep 20, 2010
  16. Feb 26, 2010
  17. Feb 14, 2010
    • Robert Haas's avatar
      Wrap calls to SearchSysCache and related functions using macros. · e26c539e
      Robert Haas authored
      The purpose of this change is to eliminate the need for every caller
      of SearchSysCache, SearchSysCacheCopy, SearchSysCacheExists,
      GetSysCacheOid, and SearchSysCacheList to know the maximum number
      of allowable keys for a syscache entry (currently 4).  This will
      make it far easier to increase the maximum number of keys in a
      future release should we choose to do so, and it makes the code
      shorter, too.
      
      Design and review by Tom Lane.
      e26c539e
  18. Jan 02, 2010
  19. Dec 19, 2009
  20. Jan 01, 2009
  21. Jan 01, 2008
  22. Nov 15, 2007
  23. Sep 04, 2007
  24. Jun 05, 2007
    • Tom Lane's avatar
      Downgrade implicit casts to text to be assignment-only, except for the ones · 31edbadf
      Tom Lane authored
      from the other string-category types; this eliminates a lot of surprising
      interpretations that the parser could formerly make when there was no directly
      applicable operator.
      
      Create a general mechanism that supports casts to and from the standard string
      types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
      I/O functions.  These new casts are assignment-only in the to-string direction,
      explicit-only in the other, and therefore should create no surprising behavior.
      Remove a bunch of thereby-obsoleted datatype-specific casting functions.
      
      The "general mechanism" is a new expression node type CoerceViaIO that can
      actually convert between *any* two datatypes if their external text
      representations are compatible.  This is more general than needed for the
      immediate feature, but might be useful in plpgsql or other places in future.
      
      This commit does nothing about the issue that applying the concatenation
      operator || to non-text types will now fail, often with strange error messages
      due to misinterpreting the operator as array concatenation.  Since it often
      (not always) worked before, we should either make it succeed or at least give
      a more user-friendly error; but details are still under debate.
      
      Peter Eisentraut and Tom Lane
      31edbadf
  25. Apr 03, 2007
  26. Apr 02, 2007
Loading