1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00
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:
Marc G. Fournier
1998-07-26 04:31:41 +00:00
parent 74b30a3a1f
commit 5979d73841
63 changed files with 641 additions and 254 deletions

View File

@@ -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

View File

@@ -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;