unescaped output of bytea - Mailing list pgsql-sql

From sad
Subject unescaped output of bytea
Date
Msg-id 200310300931.54585.sad@bankir.ru
Whole thread Raw
List pgsql-sql
Good day Guru

I thought on output to input relation in general.

Manual says about scalar types that input and output functions should be
inverse to each other, because of dump problems (if output function prints
a value not in a format that input function waiting for)

That's the geat problem i thought. If so then an external representation
could not be deffer of  SQL-constant representation (clear?)
Very common problem it is.
Most fields in this case should be manually (application level) transformed
both directions.

Then I try the experiment with text constant and text field dump:

INSERT INTO ttt values ('a\\b\'c''');
SELECT * FROM ttt; fff
--------a\b'c'

I see the output not inverse to the input.
then I DUMP the table ttt and see into the dump file:

INSERT INTO ttt VALUES ('a\\b\'c''');

THAT'S IT !!! Dump DIFFERS to plain output !
the same result with escaping apostroph we could see in bytea type.

this GOOD, VERY GOOD fact allows us to have unescaped output of bytea
without problems with a dump.





pgsql-sql by date:

Previous
From: Paul Ganainm
Date:
Subject: Re: Help on update that subselects other records in table, uses joins
Next
From: "Kumar"
Date:
Subject: Using UNION inside a cursor