Lists: | pgsql-hackers-win32pgsql-patches |
---|
From: | Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> |
---|---|
To: | 'Korea PostgreSQL Users' Group' <pgsql-kr(at)postgresql(dot)or(dot)kr>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-12 08:04:00 |
Message-ID: | A02DEC4D1073D611BAE8525405FCCE2B55F374@harris.memetrics.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
What if you instead try:
initdb --locale=C
Looks like "--no-locale" is not "equivalent to --locale=C", at least under
win32.
Cheers,
Claudio
> -----Original Message-----
> From: Korea PostgreSQL Users' Group [mailto:pgsql-kr(at)postgresql(dot)or(dot)kr]
> Sent: Friday, 12 March 2004 5:30 PM
> To: pgsql-hackers-win32(at)postgresql(dot)org
> Subject: [pgsql-hackers-win32] initdb problen
>
>
> I successed to compile and run PostgreSQL for mingw
> but
> bootstrap_template1 function in initdb.c made a problem to locale.
>
> In PostgeSQL,
> if value of LC_COLLATE is not C
> then sortting is not work when use korean language.
>
> I used this command to make db.
>
> initdb -D data --no-locale
>
> this command successed.
> but pg_controldata command returned incorrect values.
>
> LC_COLLATE: Korean_Korea.949
> LC_CTYPE: Korean_Korea.949
>
> My windows box is korean XP.
>
> How I can change above these values to C?
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>
From: | "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr> |
---|---|
To: | "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>, <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: initdb problen |
Date: | 2004-03-12 08:25:33 |
Message-ID: | 006101c4080b$9a501ae0$0b00a8c0@paolo.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
it works still problem.
setlocale() function is not equivalent between unix and win32
plz check.
multibyte text is not sorted.
----- Original Message -----
From: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
To: "'Korea PostgreSQL Users' Group'" <pgsql-kr(at)postgresql(dot)or(dot)kr>; <pgsql-hackers-win32(at)postgresql(dot)org>
Sent: Friday, March 12, 2004 5:04 PM
Subject: RE: [pgsql-hackers-win32] initdb problen
> What if you instead try:
>
> initdb --locale=C
>
> Looks like "--no-locale" is not "equivalent to --locale=C", at least under
> win32.
>
> Cheers,
> Claudio
>
>
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr> |
Cc: | Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-12 10:03:57 |
Message-ID: | 40518B0D.1090208@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
the answer is very probably here:
http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00024.php
I thought Bruce said he had this covered, but it hasn't been fixed. I
will prepare a patch in the next day or so if someone else doesn't beat
me to it.
cheers
andrew
Korea PostgreSQL Users' Group wrote:
>it works still problem.
>
>setlocale() function is not equivalent between unix and win32
>
>plz check.
>
>multibyte text is not sorted.
>
>
>----- Original Message -----
>From: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
>To: "'Korea PostgreSQL Users' Group'" <pgsql-kr(at)postgresql(dot)or(dot)kr>; <pgsql-hackers-win32(at)postgresql(dot)org>
>Sent: Friday, March 12, 2004 5:04 PM
>Subject: RE: [pgsql-hackers-win32] initdb problen
>
>
>
>
>>What if you instead try:
>>
>>initdb --locale=C
>>
>>Looks like "--no-locale" is not "equivalent to --locale=C", at least under
>>win32.
>>
>>Cheers,
>>Claudio
>>
>>
>>
>>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
>
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-12 13:55:53 |
Message-ID: | 200403121355.i2CDtrv24609@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
Andrew Dunstan wrote:
>
> the answer is very probably here:
> http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00024.php
>
> I thought Bruce said he had this covered, but it hasn't been fixed. I
> will prepare a patch in the next day or so if someone else doesn't beat
> me to it.
Sorry, I don't remember this issue.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Cc: | "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-12 16:33:35 |
Message-ID: | 4051E65F.5010700@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
I believe that the attached patch may solve this setlocale() problem,
but I do not have a Windows box handy on which to test it. Can somebody
who does please try and let us know the results?
thanks
andrew
Andrew Dunstan wrote:
>the answer is very probably here:
>http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00024.php
>
>I thought Bruce said he had this covered, but it hasn't been fixed. I
>will prepare a patch in the next day or so if someone else doesn't beat
>me to it.
>
>cheers
>
>andrew
>
>Korea PostgreSQL Users' Group wrote:
>
>
>
>>it works still problem.
>>
>>setlocale() function is not equivalent between unix and win32
>>
>>plz check.
>>
>>multibyte text is not sorted.
>>
>>
>>----- Original Message -----
>>From: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
>>To: "'Korea PostgreSQL Users' Group'" <pgsql-kr(at)postgresql(dot)or(dot)kr>; <pgsql-hackers-win32(at)postgresql(dot)org>
>>Sent: Friday, March 12, 2004 5:04 PM
>>Subject: RE: [pgsql-hackers-win32] initdb problen
>>
>>
>>
>>
>>
>>
>>>What if you instead try:
>>>
>>>initdb --locale=C
>>>
>>>Looks like "--no-locale" is not "equivalent to --locale=C", at least under
>>>win32.
>>>
>>>Cheers,
>>>Claudio
>>>
>>>
>>>
>>>
>>>
>>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 3: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>> message can get through to the mailing list cleanly
>>
>>
>>
>>
>>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
>
Attachment | Content-Type | Size |
---|---|---|
locale.patch | text/plain | 1.4 KB |
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-14 03:48:00 |
Message-ID: | 200403140348.i2E3m0328631@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Andrew Dunstan wrote:
>
>
> I believe that the attached patch may solve this setlocale() problem,
> but I do not have a Windows box handy on which to test it. Can somebody
> who does please try and let us know the results?
>
> thanks
>
> andrew
>
>
>
> Andrew Dunstan wrote:
>
> >the answer is very probably here:
> >http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00024.php
> >
> >I thought Bruce said he had this covered, but it hasn't been fixed. I
> >will prepare a patch in the next day or so if someone else doesn't beat
> >me to it.
> >
> >cheers
> >
> >andrew
> >
> >Korea PostgreSQL Users' Group wrote:
> >
> >
> >
> >>it works still problem.
> >>
> >>setlocale() function is not equivalent between unix and win32
> >>
> >>plz check.
> >>
> >>multibyte text is not sorted.
> >>
> >>
> >>----- Original Message -----
> >>From: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
> >>To: "'Korea PostgreSQL Users' Group'" <pgsql-kr(at)postgresql(dot)or(dot)kr>; <pgsql-hackers-win32(at)postgresql(dot)org>
> >>Sent: Friday, March 12, 2004 5:04 PM
> >>Subject: RE: [pgsql-hackers-win32] initdb problen
> >>
> >>
> >>
> >>
> >>
> >>
> >>>What if you instead try:
> >>>
> >>>initdb --locale=C
> >>>
> >>>Looks like "--no-locale" is not "equivalent to --locale=C", at least under
> >>>win32.
> >>>
> >>>Cheers,
> >>>Claudio
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 3: if posting/reading through Usenet, please send an appropriate
> >> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> >> message can get through to the mailing list cleanly
> >>
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
> >
> >
> >
>
> Index: src/backend/main/main.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/backend/main/main.c,v
> retrieving revision 1.75
> diff -c -r1.75 main.c
> *** src/backend/main/main.c 5 Mar 2004 01:11:04 -0000 1.75
> --- src/backend/main/main.c 12 Mar 2004 16:27:13 -0000
> ***************
> *** 74,79 ****
> --- 74,83 ----
> #endif /* NOPRINTADE */
> #endif /* __alpha */
>
> + #ifdef WIN32
> + char *env_locale;
> + #endif
> +
> #if defined(NOFIXADE) || defined(NOPRINTADE)
>
> #if defined(ultrix4)
> ***************
> *** 143,150 ****
> --- 147,176 ----
> * set later during GUC option processing, but we set it here to allow
> * startup error messages to be localized.
> */
> +
> + #ifdef WIN32
> + /*
> + * Windows uses codepages rather than the environment, so we work around
> + * that by querying the environment explicitly first for LC_COLLATE
> + * and LC_CTYPE. We have to do this because initdb passes those values
> + * in the environment. If there is nothing there we fall back on the
> + * codepage.
> + */
> +
> + if ((env_locale = getenv("LC_COLLATE")) != NULL)
> + setlocale(LC_COLLATE,env_locale);
> + else
> + setlocale(LC_COLLATE, "");
> +
> + if ((env_locale = getenv("LC_CTYPE")) != NULL)
> + setlocale(LC_CTYPE,env_locale);
> + else
> + setlocale(LC_CTYPE, "");
> + #else
> setlocale(LC_COLLATE, "");
> setlocale(LC_CTYPE, "");
> + #endif
> +
> #ifdef LC_MESSAGES
> setlocale(LC_MESSAGES, "");
> #endif
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, "Korea PostgreSQL Users' Group" <pgsql-kr(at)postgresql(dot)or(dot)kr>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: initdb problen |
Date: | 2004-03-15 16:14:24 |
Message-ID: | 200403151614.i2FGEOd09586@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 pgsql-patches |
Patch applied. Thanks.
---------------------------------------------------------------------------
Andrew Dunstan wrote:
>
>
> I believe that the attached patch may solve this setlocale() problem,
> but I do not have a Windows box handy on which to test it. Can somebody
> who does please try and let us know the results?
>
> thanks
>
> andrew
>
>
>
> Andrew Dunstan wrote:
>
> >the answer is very probably here:
> >http://archives.postgresql.org/pgsql-hackers-win32/2003-10/msg00024.php
> >
> >I thought Bruce said he had this covered, but it hasn't been fixed. I
> >will prepare a patch in the next day or so if someone else doesn't beat
> >me to it.
> >
> >cheers
> >
> >andrew
> >
> >Korea PostgreSQL Users' Group wrote:
> >
> >
> >
> >>it works still problem.
> >>
> >>setlocale() function is not equivalent between unix and win32
> >>
> >>plz check.
> >>
> >>multibyte text is not sorted.
> >>
> >>
> >>----- Original Message -----
> >>From: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
> >>To: "'Korea PostgreSQL Users' Group'" <pgsql-kr(at)postgresql(dot)or(dot)kr>; <pgsql-hackers-win32(at)postgresql(dot)org>
> >>Sent: Friday, March 12, 2004 5:04 PM
> >>Subject: RE: [pgsql-hackers-win32] initdb problen
> >>
> >>
> >>
> >>
> >>
> >>
> >>>What if you instead try:
> >>>
> >>>initdb --locale=C
> >>>
> >>>Looks like "--no-locale" is not "equivalent to --locale=C", at least under
> >>>win32.
> >>>
> >>>Cheers,
> >>>Claudio
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 3: if posting/reading through Usenet, please send an appropriate
> >> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> >> message can get through to the mailing list cleanly
> >>
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
> >
> >
> >
>
> Index: src/backend/main/main.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/backend/main/main.c,v
> retrieving revision 1.75
> diff -c -r1.75 main.c
> *** src/backend/main/main.c 5 Mar 2004 01:11:04 -0000 1.75
> --- src/backend/main/main.c 12 Mar 2004 16:27:13 -0000
> ***************
> *** 74,79 ****
> --- 74,83 ----
> #endif /* NOPRINTADE */
> #endif /* __alpha */
>
> + #ifdef WIN32
> + char *env_locale;
> + #endif
> +
> #if defined(NOFIXADE) || defined(NOPRINTADE)
>
> #if defined(ultrix4)
> ***************
> *** 143,150 ****
> --- 147,176 ----
> * set later during GUC option processing, but we set it here to allow
> * startup error messages to be localized.
> */
> +
> + #ifdef WIN32
> + /*
> + * Windows uses codepages rather than the environment, so we work around
> + * that by querying the environment explicitly first for LC_COLLATE
> + * and LC_CTYPE. We have to do this because initdb passes those values
> + * in the environment. If there is nothing there we fall back on the
> + * codepage.
> + */
> +
> + if ((env_locale = getenv("LC_COLLATE")) != NULL)
> + setlocale(LC_COLLATE,env_locale);
> + else
> + setlocale(LC_COLLATE, "");
> +
> + if ((env_locale = getenv("LC_CTYPE")) != NULL)
> + setlocale(LC_CTYPE,env_locale);
> + else
> + setlocale(LC_CTYPE, "");
> + #else
> setlocale(LC_COLLATE, "");
> setlocale(LC_CTYPE, "");
> + #endif
> +
> #ifdef LC_MESSAGES
> setlocale(LC_MESSAGES, "");
> #endif
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073