| От | Tom Lane |
|---|---|
| Тема | Re: mssql to postgres problems with bytea help needed |
| Дата | |
| Msg-id | 19027.1204826766@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: mssql to postgres problems with bytea help needed (Thomas Kellerer <spam_eater@gmx.net>) |
| Список | pgsql-general |
Thomas Kellerer <spam_eater@gmx.net> 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
valuesnot 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера