[Tickets #10602] Re: Broken Postgresql value encoding

bugs at horde.org bugs at horde.org
Tue Oct 4 18:51:35 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10602
------------------------------------------------------------------------------
  Ticket             | 10602
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Broken Postgresql value encoding
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 3. High
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2011-10-04 12:51) wrote:

This fixes on 9.1, and *should* fix on 8.1 also.

However, it doesn't use quotedStringPrefix() anymore.  That is because  
this was failing to add the 'E' prefix, since  
Horde_Db_Adapter_Postgresql_Schema is extending  
Horde_Db_Adapter_Base_Schema which will always return the empty  
string.  The dynamic determination of whether to add 'E' is instead in  
Horde_Db_Adapter_Pdo_Pgsql.

So #1 - quoteBinary() doesn't have any access to this adapter object.   
And #2, why do we even need this anyway?  Once we escape the string by  
converting characters to octets, we necessarily need to report this to  
the postgres as an escaped string, which means we must ALWAYS use the  
'E' prefix.

So I'm going to go ahead and remove the quotedStringPrefix() code.  It  
sort of looks like an artifact given the new Horde_Db_Value_Binary  
code, and it isn't used anymore after this fix.





More information about the bugs mailing list