create database doesn't work well in MULTIBYTE mode

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: create database doesn't work well in MULTIBYTE mode
Date: 2000-02-17 00:42:24
Message-ID: 000501bf78df$dbb55f00$2801007e@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

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.

Regards.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-17 01:38:38 Re: [HACKERS] Maximum columns for optimum performance (fwd)
Previous Message Hiroshi Inoue 2000-02-16 23:51:21 RE: [HACKERS] Solution for LIMIT cost estimation