mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made. Included patches should fix the problem(I changed all MB to MULTIBYTE). Please let me know if you have further problem. P.S. I did not include pathces to configure and gram.c to save the file size(configure.in and gram.y modified).
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.7 1998/07/24 03:31:39 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.8 1998/07/26 04:30:50 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -23,7 +23,7 @@ OBJS = fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \
|
||||
|
||||
DIRS = adt cache error fmgr hash init misc mmgr sort time
|
||||
|
||||
ifdef MB
|
||||
ifdef MULTIBYTE
|
||||
OBJS += mb/SUBSYS.o
|
||||
DIRS += mb
|
||||
endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/adt
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.14 1998/07/08 13:57:05 thomas Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.15 1998/07/26 04:30:52 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -13,8 +13,8 @@ include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
|
||||
ifdef MB
|
||||
CFLAGS+=-DMB=$(MB)
|
||||
ifdef MULTIBYTE
|
||||
CFLAGS+= $(MBFLAGS)
|
||||
endif
|
||||
|
||||
OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \
|
||||
|
||||
6
src/backend/utils/cache/Makefile
vendored
6
src/backend/utils/cache/Makefile
vendored
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/cache
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.7 1998/07/24 03:31:46 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.8 1998/07/26 04:30:54 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -12,8 +12,8 @@ SRCDIR = ../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
ifdef MB
|
||||
CFLAGS += -DMB=$(MB)
|
||||
ifdef MULTIBYTE
|
||||
CFLAGS+= $(MBFLAGS)
|
||||
endif
|
||||
|
||||
OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o fcache.o
|
||||
|
||||
4
src/backend/utils/cache/fcache.c
vendored
4
src/backend/utils/cache/fcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.13 1998/07/24 03:31:46 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.14 1998/07/26 04:30:55 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "catalog/pg_type.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_language.h"
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#include "catalog/pg_class_mb.h"
|
||||
#else
|
||||
#include "catalog/pg_class.h"
|
||||
|
||||
4
src/backend/utils/cache/relcache.c
vendored
4
src/backend/utils/cache/relcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.42 1998/07/24 03:31:47 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.43 1998/07/26 04:30:57 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_aggregate.h"
|
||||
#include "catalog/pg_attrdef.h"
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#include "catalog/pg_attribute_mb.h"
|
||||
#else
|
||||
#include "catalog/pg_attribute.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/init
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/init/Makefile,v 1.8 1998/07/24 03:31:49 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/init/Makefile,v 1.9 1998/07/26 04:31:00 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -12,8 +12,8 @@ SRCDIR = ../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
ifdef MB
|
||||
CFLAGS += -DMB=$(MB)
|
||||
ifdef MULTIBYTE
|
||||
CFLAGS+= $(MBFLAGS)
|
||||
endif
|
||||
|
||||
OBJS = enbl.o findbe.o globals.o miscinit.o postinit.o
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.17 1998/07/24 03:31:50 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.18 1998/07/26 04:31:01 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -234,8 +234,8 @@ SetDatabaseName(char *name)
|
||||
strcpy(DatabaseName, name);
|
||||
}
|
||||
|
||||
#ifndef MB
|
||||
/* even if MB is not enabled, this function is neccesary
|
||||
#ifndef MULTIBYTE
|
||||
/* even if MULTIBYTE is not enabled, this function is neccesary
|
||||
* since pg_proc.h does have.
|
||||
*/
|
||||
const char *
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.31 1998/07/24 03:31:50 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.32 1998/07/26 04:31:01 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
* InitPostgres() is the function called from PostgresMain
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "utils/inval.h"
|
||||
|
||||
#include "catalog/catname.h"
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#include "catalog/pg_database_mb.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#else
|
||||
@@ -83,7 +83,7 @@ static void InitStdio(void);
|
||||
static void InitUserid(void);
|
||||
|
||||
extern char *ExpandDatabasePath(char *name);
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding);
|
||||
#else
|
||||
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path);
|
||||
@@ -128,12 +128,12 @@ InitMyDatabaseInfo(char *name)
|
||||
Oid owner;
|
||||
char *path,
|
||||
myPath[MAXPGPATH + 1];
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
int encoding;
|
||||
#endif
|
||||
|
||||
SetDatabaseName(name);
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath, &encoding);
|
||||
#else
|
||||
GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath);
|
||||
@@ -147,7 +147,7 @@ InitMyDatabaseInfo(char *name)
|
||||
|
||||
path = ExpandDatabasePath(myPath);
|
||||
SetDatabasePath(path);
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
SetDatabaseEncoding(encoding);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/mb
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.1 1998/07/24 03:31:54 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.2 1998/07/26 04:31:03 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -12,8 +12,8 @@ SRCDIR = ../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
ifdef MB
|
||||
CFLAGS += -DMB=$(MB)
|
||||
ifdef MULTIBYTE
|
||||
CFLAGS+= $(MBFLAGS)
|
||||
endif
|
||||
|
||||
OBJS = common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o variable.o
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* client encoding and server internal encoding.
|
||||
* (currently mule internal code (mic) is used)
|
||||
* Tatsuo Ishii
|
||||
* $Id: mbutils.c,v 1.1 1998/07/24 03:31:56 scrappy Exp $ */
|
||||
* $Id: mbutils.c,v 1.2 1998/07/26 04:31:04 scrappy Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -183,7 +183,7 @@ int pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
|
||||
/*
|
||||
* fuctions for utils/init
|
||||
*/
|
||||
static int DatabaseEncoding = MB;
|
||||
static int DatabaseEncoding = MULTIBYTE;
|
||||
void
|
||||
SetDatabaseEncoding(int encoding)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Makefile for utils/misc
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.7 1998/07/24 03:31:58 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.8 1998/07/26 04:31:06 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -13,8 +13,8 @@ include ../../../Makefile.global
|
||||
|
||||
CFLAGS += -I../..
|
||||
|
||||
ifdef MB
|
||||
CFLAGS += -DMB=$(MB)
|
||||
ifdef MULTIBYTE
|
||||
CFLAGS+= $(MBFLAGS)
|
||||
endif
|
||||
|
||||
OBJS = database.o superuser.o
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.12 1998/07/24 03:31:59 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.13 1998/07/26 04:31:07 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "access/heapam.h"
|
||||
#include "access/xact.h"
|
||||
#include "catalog/catname.h"
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
#include "catalog/pg_database_mb.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#else
|
||||
@@ -184,7 +184,7 @@ ExpandDatabasePath(char *dbpath)
|
||||
* --------------------------------
|
||||
*/
|
||||
void
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding)
|
||||
#else
|
||||
GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path)
|
||||
@@ -275,14 +275,23 @@ GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path)
|
||||
* means of getting at sys cat attrs.
|
||||
*/
|
||||
tup_db = (Form_pg_database) GETSTRUCT(tup);
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
/* get encoding from template database.
|
||||
This is the "default for default" for
|
||||
create database command.
|
||||
*/
|
||||
if (strcmp("template1",tup_db->datname.data) == 0)
|
||||
{
|
||||
SetTemplateEncoding(tup_db->encoding);
|
||||
}
|
||||
#endif
|
||||
if (strcmp(name, tup_db->datname.data) == 0)
|
||||
{
|
||||
*db_id = tup->t_oid;
|
||||
strncpy(path, VARDATA(&(tup_db->datpath)),
|
||||
(VARSIZE(&(tup_db->datpath)) - VARHDRSZ));
|
||||
*(path + VARSIZE(&(tup_db->datpath)) - VARHDRSZ) = '\0';
|
||||
#ifdef MB
|
||||
#ifdef MULTIBYTE
|
||||
*encoding = tup_db->encoding;
|
||||
#endif
|
||||
goto done;
|
||||
|
||||
Reference in New Issue
Block a user