Search Postgresql Archives

Re: mssql to postgres problems with bytea help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Kellerer <spam_eater@xxxxxxx> writes:
> robert, 06.03.2008 15:32:
>> I've successfully converted a huge mssql ddl to postgres 8.1.9 - I
>> could upgrade if need be. We run both db's for our app depending on
>> the customer. We have a new feature, storing serialized java objects
>> in the db, and I'm having trouble with on this insert:

> The syntax for specifying "BLOB literals" is a bit different in Postgres. You need to encode the bytes as octal values not hex values. 

And you need some quotes, too.

It might make for less change in the application if you use decode() to
convert a hex string to bytea, a la

	decode('ACED0005737200286...', 'hex')

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux