Shouldn't non-MULTIBYTE backend refuse to start in MB database?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Shouldn't non-MULTIBYTE backend refuse to start in MB database?
Date: 2001-02-14 22:49:45
Message-ID: 26834.982190985@sss.pgh.pa.us
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?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-02-14 22:55:00 Re: Open 7.1 items
Previous Message Thomas Lockhart 2001-02-14 22:49:04 Re: Open 7.1 items