• Marc G. Fournier's avatar
    From: Oleg Bartunov <oleg@sai.msu.su> · 5b1311ac
    Marc G. Fournier authored
    Subject: [HACKERS] locale patches !
    
    Hi there,
    
    here are little patches to get Postgres 6.1 works with locale stuff.
    This is a patch against 970402.tar.gz, there are no problem to apply them
    by hand to 6.0 release. Collate stuff tested about 1-2 months in real
    working database but I'm sure there must be no problem. US hackers
    could vote against locale implementation ( locale for sure will affect to
    speed of postgres ), so I introduce variable USE_LOCALE which
    controls locale stuff. Non-US users now could use ~* operator
    for searching and <order by> for strings with nation alphabet.
    Please, don't forget, as I did first time, to set environment variable
    LC_CTYPE and LC_COLLATE because backend get locale information from them.
    I start postmaster from a little script, assuming that shell is Bash shell
    it looks like:
    
    #!/bin/sh
    
    export LC_CTYPE=koi8-r
    export LC_COLLATE=koi8-r
    postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
    5b1311ac
Makefile 1.42 KB
#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for parser
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.5 1997/04/02 18:12:14 scrappy Exp $
#
#-------------------------------------------------------------------------

SRCDIR= ../..
include ../../Makefile.global

INCLUDE_OPT= -I.. \
             -I../port/$(PORTNAME) \
             -I../../include

CFLAGS+= $(INCLUDE_OPT)

OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \
      keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o

all: SUBSYS.o

SUBSYS.o: $(OBJS)
	$(LD) -r -o SUBSYS.o $(OBJS)

gram.c parse.h: gram.y
	$(YACC) $(YFLAGS) $<
	mv y.tab.c gram.c
	mv y.tab.h parse.h

scan.c:	scan.l
	$(LEX) $<
	mv lex.yy.c scan.c

# The following dependencies on parse.h are computed by
# make depend, but we state them here explicitly anyway because 
# parse.h doesn't even exist at first and if user fails to 
# do make depend, we still want the build to succeed.

analyze.o keywords.o scan.o: parse.h

# This is unusual:  We actually have to build some of the parts before
# we know what the header file dependencies are.  
dep: gram.c scan.c
	$(CC) -MM $(INCLUDE_OPT) *.c >depend

clean: 
	rm -f SUBSYS.o $(OBJS) gram.c parse.h scan.c
# And the garbage that might have been left behind by partial build:
	rm -f y.tab.c y.tab.h lex.yy.c

ifeq (depend,$(wildcard depend))
include depend
endif