I'm using SymmetricDS to replicate data from an Oracle DB to a Postgres DB, and let it create the schema in the Postgres slave. A column with type RAW in Oracle was converted to BYTEA in Postgres. Values are converted as such
RAW: 24E1EB73A5CA0D17E05400144FF9F89C
BYTEA: \x24E1EB73A5CA0D17E05400144FF9F89C
I.e., somewhere in the process, the value gets prepended with \x
. Querying using the prepended string in psql
works fine. However, when I try to query it from my Rails application, I only get empty results, both with the RAW string and the prepended BYTEA string. If I try to use the suggested Rails util methods like escape_bytea()
, I get a string that looks like this
\\x3234453145423733413543413044313745303534303031343446463946383943
Is this the format SymmetricDS should have used to input the data in the Postgres DB? Or is there a way to tweak the query string so I can get the results on the current format?