Re: [HACKERS] libpq+MB/putenv(), getenv() clean up

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] libpq+MB/putenv(), getenv() clean up
Date: 2000-01-13 03:52:12
Message-ID: 20000113125212C.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I think it is a very good idea to remove getenv() from PQmblen().
> getenv() is rather slow, at least on the machines I use, and having
> to do it for each character processed is a huge performance hit.

I didn't notice that. Thanks for the point.

> PQmblen is exported by libpq (psql is an example of an application
> that uses it). So very possibly, changing it would break a few client
> applications. A possible answer is to leave PQmblen alone, and invent
> a new routine with a different name that looks at PGconn. We could
> deprecate PQmblen and delete it after a few releases. I'm not sure
> if this is worth the trouble or not --- maybe it's OK to make a non-
> compatible change to PQmblen.

With the changes I propose, PQmblen() would not work anymore
anyway. I'll post to interfaces list about the incompatible changes.

> You would still do one getenv() during connection setup, right, to see
> if PGCLIENTENCODING is set?

Yes.

>If you don't, that would be a significant
> change in behavior that might make a lot of people unhappy.

So the behavior won't be changed.
--
Tatsuo Ishii

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-01-13 04:05:41 RE: [HACKERS] BlowAwayRelationBuffers
Previous Message Tom Lane 2000-01-13 03:40:48 Re: [HACKERS] BlowAwayRelationBuffers