Skip to content
Snippets Groups Projects
  1. Feb 26, 2008
    • Tom Lane's avatar
      Fix encode(...bytea..., 'escape') so that it converts all high-bit-set byte · fd15dba5
      Tom Lane authored
      values into \nnn octal escape sequences.  When the database encoding is
      multibyte this is *necessary* to avoid generating invalidly encoded text.
      Even in a single-byte encoding, the old behavior seems very hazardous ---
      consider for example what happens if the text is transferred to another
      database with a different encoding.  Decoding would then yield some other
      bytea value than what was encoded, which is surely undesirable.  Per gripe
      from Hernan Gonzalez.
      
      Backpatch to 8.3, but not further.  This is a bit of a judgment call, but I
      make it on these grounds: pre-8.3 we don't really have much encoding safety
      anyway because of the convert() function family, and we would also have much
      higher risk of breaking existing apps that may not be expecting this behavior.
      8.3 is still new enough that we can probably get away with making this change
      in the function's behavior.
      fd15dba5
  2. Jan 01, 2008
  3. 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
  4. Jan 05, 2007
  5. Mar 05, 2006
  6. Oct 15, 2005
  7. Sep 24, 2005
  8. Jan 01, 2005
  9. Aug 29, 2004
  10. May 07, 2004
    • Tom Lane's avatar
      Solve the 'Turkish problem' with undesirable locale behavior for case · 0bd61548
      Tom Lane authored
      conversion of basic ASCII letters.  Remove all uses of strcasecmp and
      strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
      remove most but not all direct uses of toupper and tolower in favor of
      pg_toupper and pg_tolower.  These functions use the same notions of
      case folding already developed for identifier case conversion.  I left
      the straight locale-based folding in place for situations where we are
      just manipulating user data and not trying to match it to built-in
      strings --- for example, the SQL upper() function is still locale
      dependent.  Perhaps this will prove not to be what's wanted, but at
      the moment we can initdb and pass regression tests in Turkish locale.
      0bd61548
  11. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  12. Sep 25, 2003
  13. Aug 05, 2003
  14. Jul 27, 2003
  15. Nov 05, 2001
  16. Oct 28, 2001
  17. Oct 25, 2001
  18. Oct 01, 2001
  19. Sep 14, 2001
    • Bruce Momjian's avatar
      > Here's a revised patch. Changes: · c1fbf066
      Bruce Momjian authored
      >
      > 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape')
      > Note that I ended up leaving \0 as \000 so that there are no ambiguities
      > when decoding something like, for example, \0123.
      >
      > 2. Fixed bug in byteain which allowed input values which were not valid
      > octals (e.g. \789), to be parsed as if they were octals.
      >
      > Joe
      >
      
      Here's rev 2 of the bytea string support patch. Changes:
      
      1. Added missing declaration for MatchBytea function
      2. Added PQescapeBytea to fe-exec.c
      3. Applies cleanly on cvs tip from this afternoon
      
      I'm hoping that someone can review/approve/apply this before beta starts, so
      I guess I'd vote (not that it counts for much) to delay beta a few days :-)
      
      Joe Conway
      c1fbf066
  20. Jul 12, 2001
Loading