Skip site navigation (1) Skip section navigation (2)

Re: how to read bytea contents by using pgsql scripts

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: m_vijaykumar(at)hotmail(dot)com (vijaykumar M)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to read bytea contents by using pgsql scripts
Date: 2003-11-24 11:26:02
Message-ID: 200311241026.LAA05684@rodos (view raw or flat)
Thread:
Lists: pgsql-sql
> 
> 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 <your-dbase-name> -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 


In response to

pgsql-sql by date

Next:From: vijaykumar MDate: 2003-11-24 12:47:42
Subject: Re: how to read bytea contents by using pgsql scripts
Previous:From: Matthew LunnonDate: 2003-11-24 09:21:39
Subject: Re: increment int value in subset of rows?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group