RE: [HACKERS] create database doesn't work well in MULTIBYTE mode

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] create database doesn't work well in MULTIBYTE mode
Date: 2000-02-17 06:04:03
Message-ID: 000a01bf790c$cade54c0$2801007e@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: Thursday, February 17, 2000 2:41 PM
>
> > I have a crash while creating regression database in pararell regression
> > test.
> > Seems it's due to the following change.
> >
> > @@ -2638,7 +2705,14 @@
> > n->dbname = $3;
> > n->dbpath = $5;
> > #ifdef MULTIBYTE
> > - n->encoding = $6;
> > + if ($6 != NULL) {
> > + n->encoding =
> pg_char_to_encoding($6);
> > + if (n->encoding < 0) {
> > + elog(ERROR,
> "Encoding name '%s' is invalid", $6);
> > + }
> > + } else {
> > + n->encoding =
> GetTemplateEncoding();
> > + }
> > #else
> > n->encoding = 0;
> > #endif
> >
> > Why ?
> > $6 is an ival not an str.
>
> Not sure what to recommend here, but you clearly have found a problem.
> Try it as a string, and if that works, patch it.
>

$6 is already converted from string to ival in another place.
It seems to me that this change is unnecessary.
I don't understand why this was changed recently.

Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-02-17 06:04:45 Re: [HACKERS] Date/time types: big change
Previous Message Bruce Momjian 2000-02-17 05:40:32 Re: [HACKERS] create database doesn't work well in MULTIBYTE mode