Re: Setting locale per connection

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Behdad Esfahbod" <behdad(at)bamdad(dot)org>, "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Setting locale per connection
Date: 2003-07-02 03:12:42
Message-ID: 072b01c34047$cd612fa0$2800a8c0@mars
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I usually use PostgreSQL for multiple languages, so I needed to
> set locale per connection, or can change the locale on the fly.
> I don't know if there is any such ability integrated in or not,
> so I have wrote my 10lines function as a wrapper around
> setlocale, that is attached. So what I do is just a simple
> "SELECT locale('LC_COLLATE', 'fa_IR');" at connection time. Let
> me know if there is any standard way already implemented.

Don't know the answer to that one..

> Another silly question, isn't any way to get rid of seqscan, when
> doing 'SELECT count(*) FROM tab;'?

No, there's not. Due to PostgreSQL design restrictions. Just avoid doing
it, or use a trigger to keep a summary table or something.

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Behdad Esfahbod 2003-07-02 03:23:46 Re: Setting locale per connection
Previous Message Stephan Szabo 2003-07-02 03:05:18 Re: Setting locale per connection