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

Re: possible design bug with PQescapeString()

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: possible design bug with PQescapeString()
Date: 2006-02-26 14:17:40
Message-ID: 20060226.231740.25401482.t-ishii@sraoss.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
> > > But actually I'd argue that
> > > letting the client programmer supply the encoding is still a pretty
> > > dangerous practice.  Your example demonstrates that if the encoding
> > > PQescapeString is told is different from the encoding the backend parser
> > > thinks is in use, problems result.  Perhaps we should pass the PGconn
> > > to new-PQescapeString and let it dig the client encoding out of that.
> > 
> > Sound good to pass PGconn to new-PQescapeString. Here is the proposed
> > calling sequence for the new function:
> > 
> > size_t PQescapeStringWithConn (const PGconn *conn, char *to, const char *from, size_t length)
> > 
> > If this is ok, I will implement for 8.2.

Here is the promised patches for 8.2. If there's no objection, I will
commit tomorrow.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

In response to

pgsql-hackers by date

Next:From: Tatsuo IshiiDate: 2006-02-26 14:40:13
Subject: Re: possible design bug with PQescapeString()
Previous:From: Tatsuo IshiiDate: 2006-02-26 14:13:59
Subject: Re: possible design bug with PQescapeString()

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