Branch: Tag:

2011-02-02

2011-02-02 16:38:21 by Stephen R. van den Berg <srb@cuci.nl>

Add support for bytea encoding. Fixes [bug 5377 (#5377)].

Thanks to Stephen R. van den Berg <srb@cuci.nl> for the patch.

Rev: server/etc/modules/Roxen.pmod:1.305

1:   // This is a roxen pike module. Copyright © 1999 - 2009, Roxen IS.   // - // $Id: Roxen.pmod,v 1.304 2011/01/20 14:01:01 grubba Exp $ + // $Id: Roxen.pmod,v 1.305 2011/02/02 16:38:21 grubba Exp $      #include <roxen.h>   #include <config.h>
2783:    case "oracle":    return replace (val, "'", "''");    +  case "bytea": +  return replace (val, +  ({ "'", "\\", "\0", "&" }), +  { "\\'", "\\\\\\\\", "\\\\000", "\\\\046" }) ); +     case "csv":    if (sizeof(val) &&    ((<' ', '\t'>)[val[0]] || (<' ', '\t'>)[val[-1]] ||
2915:   //! NOTE: Do NOT use this quoting method when creating   //! sql-queries intended for MySQL!   //! + //! @value "bytea" + //! PostgreSQL quoting for BYTEA (binary) values. + //!   //! @value "mysql-pike"   //! Compat. MySQL quoting followed by Pike string quoting.   //! Equvivalent to using @expr{"mysql.pike"@}.