| От | Andrew Dunstan |
|---|---|
| Тема | Re: convert int to bytea |
| Дата | |
| Msg-id | 474EEF16.5000705@dunslane.net обсуждение исходный текст |
| Ответ на | Re: convert int to bytea ("Usama Dar" <munir.usama@gmail.com>) |
| Список | pgsql-hackers |
Usama Dar wrote: > > > > 2) i know what a byte order is , i just thought your interface i.e. > libpq would convert it to the local byte order. > You haven't thought this through. Data traveling over libpq is still text, not binary, in most cases, so byte order is irrelevant at that time. The translation to a bytea (if possible) would be done after the data was already on the server and the int was in its native, architecture dependent form. The short answer is thus still that there is no sane consistent cast from int to bytea. If you want a bytea then it's really up to you to contruct the byte array. cheers andrew
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера