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 66D3ED1B3A8 for ; Fri, 16 Jul 2004 17:48:47 -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 39956-09 for ; Fri, 16 Jul 2004 20:48:48 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 7D291D1B38E for ; Fri, 16 Jul 2004 17:48:44 -0300 (ADT) Received: (qmail 7514 invoked by uid 65534); 16 Jul 2004 20:48:46 -0000 Received: from dsl-082-082-224-250.arcor-ip.net (EHLO colt.pezone.net) (82.82.224.250) by mail.gmx.net (mp013) with SMTP; 16 Jul 2004 22:48:46 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: "Peter Wang" , Subject: Re: BYTEA output presentation Date: Fri, 16 Jul 2004 22:48:43 +0200 User-Agent: KMail/1.5.1 References: <3AE153EDD5CA7B4CBA26FCDA1CBA6478403412@hermes.internal.powerupnetworks.com> In-Reply-To: <3AE153EDD5CA7B4CBA26FCDA1CBA6478403412@hermes.internal.powerupnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200407162248.43228.peter_e@gmx.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/107 X-Sequence-Number: 18359 Peter Wang wrote: > The BYTEA data look like "/031/024/001/003?/022/....". > How can I use some PostgreSQL function to remove "/" when I use > select statement ? What type of format is the BYTEA datatype? Can I > output it to hexadecimal or octal format ? If you can, how ? Or do > you know any third party tool or script which can output the > hexadecimal or octal format for PostgreSQL's BYTEA datatype ? Your > help is appreciated. Thank you. libpq has functions to deal with bytea data: http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA -- Peter Eisentraut http://developer.postgresql.org/~petere/