Skip to content

Commit 88d7404

Browse files
committed
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: [HACKERS] Money integration patches Here are patches to integrate the money data type. I have included some math and aggregate functions and have made the locale support optional by #ifdef USE_LOCALE bracketing of functions. Modules affected are: builtins.h.patch cash.c.patch cash.h.patch main.c.patch pg_aggregate.h.patch pg_operator.h.patch pg_proc.h.patch pg_type.h.patch I changed the data type to be pass-by-reference rather than by-value to pave the way for a larger internal representation (64-bit ints?). Also, I changed the tabbing of cash.c and cash.h to match most of the other Postgres source code files (4 space indent, 8 spaces == 1 tab). The locale stuff should be tested under another convention (Russian?) but I don't know what the correct results should be so perhaps someone else can give them a try. Will update docs and regression tests in the next few days.
1 parent d8a300d commit 88d7404

File tree

9 files changed

+592
-299
lines changed

9 files changed

+592
-299
lines changed

src/backend/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.5 1997/04/12 09:37:31 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.6 1997/04/15 17:39:17 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -38,6 +38,7 @@ main(int argc, char *argv[])
3838
#ifdef USE_LOCALE
3939
setlocale(LC_CTYPE,""); /* take locale information from an environment */
4040
setlocale(LC_COLLATE,"");
41+
setlocale(LC_MONETARY,"");
4142
#endif
4243
#if defined(NOFIXADE) || defined(NOPRINTADE)
4344
/*

src/backend/port/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
# be converted to Method 2.
2020
#
2121
# IDENTIFICATION
22-
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.3 1997/03/19 02:33:29 scrappy Exp $
22+
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.4 1997/04/15 17:39:23 scrappy Exp $
2323
#
2424
#-------------------------------------------------------------------------
2525

26+
SRCDIR=../..
2627
include ../../Makefile.global
2728

2829
ifndef PORTNAME

0 commit comments

Comments
 (0)