Re: Bytea question with \208
От | Lew |
---|---|
Тема | Re: Bytea question with \208 |
Дата | |
Msg-id | icqdnUlN4v2BMCDbnZ2dnUVZ_ruqnZ2d@comcast.com обсуждение исходный текст |
Ответ на | Re: Bytea question with \208 (Decibel! <decibel@decibel.org>) |
Список | pgsql-general |
Decibel! wrote: > On Thu, Aug 09, 2007 at 04:16:15PM -0400, Woody Woodring wrote: >> My bad, the table I was looking (8.7) at had the first column as the >> decimal representation and I did notice that the numbers changed as they >> moved right. >> >> Is there a way for bytea to take a hex number, or do I need to convert the >> bit stream to octal numbers? > > to_hex()? to_hex() produces the text representation of the hex digits, not the actual bytes with those values. What the OP wants is to conveniently represent the bytestream to send to the bytea column. They're looking for an escape sequence to embed into a text representation that will map to the exact byte contents to insert, not a text representation of that representation. Say, > Also supported are \digits, where digits represents an octal byte value, and \xhexdigits, where hexdigits represents ahexadecimal byte value. (It is your responsibility that the byte sequences you create are valid characters in the servercharacter set encoding.) <http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS> Amazing how useful the docs are. -- Lew
В списке pgsql-general по дате отправления: