X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3C35BD1B52D for ; Thu, 30 Oct 2003 06:30:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 86292-08 for ; Thu, 30 Oct 2003 02:30:02 -0400 (AST) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id D75C6D1B523 for ; Thu, 30 Oct 2003 02:30:00 -0400 (AST) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id 42C03913FE for ; Thu, 30 Oct 2003 09:29:48 +0300 (MSK) Received: from sad.localnet.ru (sad.localnet.ru [10.0.0.33]) by rock.spider.ru (Postfix) with ESMTP id 097229136C for ; Thu, 30 Oct 2003 09:29:48 +0300 (MSK) Content-Type: text/plain; charset="us-ascii" From: sad Organization: IT To: "psql" Subject: unescaped output of bytea Date: Thu, 30 Oct 2003 09:31:54 +0000 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200310300931.54585.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=BAYES_30, DATE_IN_FUTURE_03_06, USER_AGENT_KMAIL X-Spam-Level: X-Archive-Number: 200310/392 X-Sequence-Number: 15792 Good day Guru I thought on output to input relation in general. Manual says about scalar types that input and output functions should be=20 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=20 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=20 without problems with a dump.