Re: have you feel anything when you read this ? - Mailing list pgsql-sql

From Rod Taylor
Subject Re: have you feel anything when you read this ?
Date
Msg-id 1142870288.35058.29.camel@home
Whole thread Raw
In response to Re: have you feel anything when you read this ?  ("Eugene E." <sad@bankir.ru>)
List pgsql-sql
On Mon, 2006-03-20 at 17:53 +0300, Eugene E. wrote:
> I wrote:
> 
> >> the problem is: you'll get this four byte sequence '\000' _instead_ 
> >> of  NUL-byte anyway.
> 
> You wrote:
> 
> > Your client library should take care of escaping and de-escaping. 
> 
> We both agree as you see.
> 
> Then i am asking:
> WHY should a client take care of de-escaping ? Why not to get his data 
> unchanged ?

Request the data be delivered to you in binary format instead of text
format (see  PQexecParams, PQexecPrepared, etc).

When you request text format it requires some escaping to occur for
obvious reasons, but you don't need to worry about the length of the
data.

When you request binary escaping is not required but you do need to
worry about the length of the data.

Pick the method that suits you best.
-- 



pgsql-sql by date:

Previous
From: "Fay Du"
Date:
Subject: pgsql2shp - Could not create dbf file
Next
From: Scott Marlowe
Date:
Subject: Re: have you feel anything when you read this ?