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 a hexadecimal byte value. (It is your 
responsibility that the byte sequences you create are valid characters in the 
server character set encoding.)
<http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS>

Amazing how useful the docs are.

--
Lew

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to