1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

I really hope that I haven't missed anything in this one...

From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
This commit is contained in:
Marc G. Fournier
1998-07-24 03:32:46 +00:00
parent 6e66468f3a
commit bf00bbb0c4
82 changed files with 2161 additions and 759 deletions

View File

@@ -4,7 +4,7 @@
# Makefile for storage/lmgr
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v 1.6 1998/04/06 00:25:43 momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v 1.7 1998/07/24 03:31:32 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -12,6 +12,9 @@ SRCDIR = ../../..
include ../../../Makefile.global
CFLAGS += -I../..
ifdef MB
CFLAGS += -DMB=$(MB)
endif
OBJS = lmgr.o lock.o multi.o proc.o single.o

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.13 1998/07/13 16:34:50 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.14 1998/07/24 03:31:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,11 @@
#include "catalog/catname.h"
#include "catalog/catalog.h"
#ifdef MB
#include "catalog/pg_class_mb.h"
#else
#include "catalog/pg_class.h"
#endif
#include "nodes/memnodes.h"
#include "storage/bufmgr.h"

View File

@@ -4,7 +4,7 @@
# Makefile for storage/smgr
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/storage/smgr/Makefile,v 1.6 1998/04/06 00:25:58 momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/storage/smgr/Makefile,v 1.7 1998/07/24 03:31:35 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -13,6 +13,10 @@ include ../../../Makefile.global
CFLAGS += -I../..
ifdef MB
CFLAGS += -DMB=$(MB)
endif
OBJS = md.o mm.o smgr.o smgrtype.o
all: SUBSYS.o

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.33 1998/07/20 16:56:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.34 1998/07/24 03:31:35 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -568,8 +568,15 @@ mdblindwrt(char *dbstr,
Oid owner,
id;
char *tmpPath;
#ifdef MB
int tmpEncoding;
#endif
#ifdef MB
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
#else
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath);
#endif
if (id != dbid)
elog(FATAL, "mdblindwrt: oid of db %s is not %u", dbstr, dbid);
@@ -607,7 +614,15 @@ mdblindwrt(char *dbstr,
id;
char *tmpPath;
#ifdef MB
int tmpEncoding;
#endif
#ifdef MB
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
#else
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath);
#endif
if (id != dbid)
elog(FATAL, "mdblindwrt: oid of db %s is not %u", dbstr, dbid);