unescaped output of bytea

Поиск
Список
Период
Сортировка
От sad
Тема unescaped output of bytea
Дата
Msg-id 200310300931.54585.sad@bankir.ru
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Paul Ganainm
Дата:
Сообщение: Re: Help on update that subselects other records in table, uses joins
Следующее
От: "Kumar"
Дата:
Сообщение: Using UNION inside a cursor