Re: inserting binary in a bytea field - Mailing list pgsql-bugs

From Tom Lane
Subject Re: inserting binary in a bytea field
Date
Msg-id 11201.975695894@sss.pgh.pa.us
Whole thread Raw
In response to inserting binary in a bytea field  (Olivier Jeannet <jeannet@montrouge.tt.slb.com>)
List pgsql-bugs
Olivier Jeannet <jeannet@montrouge.tt.slb.com> writes:
> Is this normal ?
> Am I supposed to get binary values as escaped ASCII,

Yes.  Otherwise you'd have big trouble with, for example, \000.

You can use a binary cursor to read out unconverted data, but that might
be more trouble than it's worth.

There has been talk of designing some access functions similar to the
large-object functionality (lo_read/lo_write, etc) for bytea values.
That would bypass this issue and also allow reading/writing large
values in sections, which'd be awfully nice.  Not done yet though.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Olivier Jeannet
Date:
Subject: inserting binary in a bytea field
Next
From: Tom Lane
Date:
Subject: psql doesn't count lines correctly in pg_dump scripts