| От | Andrus Moor |
|---|---|
| Тема | Wrong length of bytea field |
| Дата | |
| Msg-id | dtnsbr$1t16$1@news.hub.org обсуждение |
| Ответы |
Re: Wrong length of bytea field
|
| Список | pgsql-general |
I inserted two binary files to a bytea field "contents" file1 size was 7834649 bytes file2 size was 5888534 bytes select filename, octet_length(contents), length(contents) from localfil returns "file1 ";16777184;16777184 "file2 ";15768893;15768893 It seems that for some reason postgres returns sometimes escaped string size (eq. single byte 0x00 uploaded as \\000 size is returned as 5 ) Why result is incorrect ? How to get the actual size of bytea field ? Using Postgres 8.1 in XP , cluster encoding is UTF-8 Andrus.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера