From: | Behdad Esfahbod <behdad(at)bamdad(dot)org> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Setting locale per connection |
Date: | 2003-07-02 02:52:51 |
Message-ID: | Pine.LNX.4.44.0307020717040.20969-200000@gilas.bamdad.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
I'm new to the list, so don't flame at the first date ;).
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.
Another silly question, isn't any way to get rid of seqscan, when
doing 'SELECT count(*) FROM tab;'?
Yours,
behdad
--
Behdad Esfahbod 11 Tir 1382, 2003 Jul 2
http://behdad.org/ [Finger for Geek Code]
If you do a job too well, you'll get stuck with it.
Attachment | Content-Type | Size |
---|---|---|
pgbe_setlocale.c | text/plain | 819 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2003-07-02 02:56:59 | Re: Setting locale per connection |
Previous Message | Christopher Kings-Lynne | 2003-07-02 01:42:52 | Re: Urgent : Regarding Submission of Code |