Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

_Actually_ hex escape in PostgreSQL 9.0+

Forgot to add the leading \x in the last commit.
  • Loading branch information...
commit 3cdbcf268e372fb7632a060daafc58b6e1d6b89e 1 parent bd63d2e
@ajuckel ajuckel authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/arjdbc/postgresql/adapter.rb
View
2  lib/arjdbc/postgresql/adapter.rb
@@ -613,7 +613,7 @@ def quote(value, column = nil) #:nodoc:
def escape_bytea(s)
if s
if supports_hex_escaped_bytea?
- s.unpack("H*")[0]
+ "\\\\x#{s.unpack("H*")[0]}"
else
result = ''
s.each_byte { |c| result << sprintf('\\\\%03o', c) }
Please sign in to comment.
Something went wrong with that request. Please try again.