X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8BFEC5280B for ; Mon, 20 Jun 2005 10:47:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45319-09 for ; Mon, 20 Jun 2005 13:47:09 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 37F3B5283A for ; Mon, 20 Jun 2005 10:47:05 -0300 (ADT) Received: from dicaprio.akademie1.de (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id j5KDl7V18562 for ; Mon, 20 Jun 2005 15:47:08 +0200 Subject: SQL repr of bytea val From: Markus Bertheau =?UTF-8?Q?=E2=98=AD?= To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 Date: Mon, 20 Jun 2005 15:47:01 +0200 Message-Id: <1119275221.4688.14.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/257 X-Sequence-Number: 21858 Hi, I'm constructing querys on the fly in PL/pgSQL_ and need a function that returns the SQL representation of a bytea value. I tried encode(.., 'escape') but it seems to return 8 bit ASCII values, not the \377 stuff that's supposed to be in the bytea input syntax. Does anyone know a way to do that? Markus -- Markus Bertheau ☭