X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C6D4DD1B50A for ; Mon, 24 Nov 2003 10:26:38 +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 44527-03 for ; Mon, 24 Nov 2003 06:26:09 -0400 (AST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 08415D1D8DA for ; Mon, 24 Nov 2003 06:26:05 -0400 (AST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Mon Nov 24 11:26:03 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id LAA17507; Mon, 24 Nov 2003 11:26:03 +0100 (MET) From: Christoph Haller Message-Id: <200311241026.LAA05684@rodos> Subject: Re: how to read bytea contents by using pgsql scripts To: m_vijaykumar@hotmail.com (vijaykumar M) Date: Mon, 24 Nov 2003 11:26:02 MET Cc: pgsql-sql@postgresql.org In-Reply-To: ; from "vijaykumar M" at Nov 24, 103 10:49 am X-Mailer: Elm [revision: 212.4] X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200311/273 X-Sequence-Number: 16088 > > Hi All, > Is their any way to read the bytea contents by using pgsql script. > > Thanks & regards > Vijay > > _________________________________________________________________ > Not sure if that's what you are asking for but you can do e.g. $PGSQLD/bin/psql -d -f ./query2.txt > ./query2.res ./query2.txt has something like select * from bytea_tab ; then you'll find all non-printables in ./query2.res properly escaped as octets as shown in Data Types - Binary Strings. HTH Regards, Christoph