From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? |
Date: | 2001-02-15 01:42:44 |
Message-ID: | 20010215104244G.t-ishii@sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> We now have defenses against running a non-LOCALE-enabled backend in a
> database that was created in non-C locale. Shouldn't we likewise
> prevent a non-MULTIBYTE-enabled backend from running in a database with
> a multibyte encoding that's not SQL_ASCII? Or am I missing a reason why
> that is safe?
>
> I propose the following addition to ReverifyMyDatabase in postinit.c:
>
> #ifdef MULTIBYTE
> SetDatabaseEncoding(dbform->encoding);
> + #else
> + if (dbform->encoding != SQL_ASCII)
> + elog(FATAL, "some suitable error message");
> #endif
>
> Comments?
Running a non-MULTIBYTE-enabled backend on a database with a multibyte
encoding other than SQL_ASCII should be safe as long as:
1) read only access
2) the encodings are actually single byte encodings
If mutibyte encoding database is updated by a non-MULTIBYTE-enabled
backend, there might be a chance that data could corrupted since the
backend does not handle mutibyte strings correctly.
So I think you suggestion is a improvement.
--
Tatsuo Ishii
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-15 01:52:57 | Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? |
Previous Message | Tatsuo Ishii | 2001-02-15 01:41:44 | Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database? |