1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Remove all traces of multibyte and locale options. Clean up comments

referring to "multibyte" where it really means character encoding.
This commit is contained in:
Peter Eisentraut
2002-09-03 21:45:44 +00:00
parent 86f27321e2
commit 77f7763b55
47 changed files with 127 additions and 284 deletions

View File

@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.54 2002/08/20 16:46:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.55 2002/09/03 21:45:42 petere Exp $
*/
#include "postgres.h"
@@ -61,7 +61,7 @@ CashGetDatum(Cash value)
* XXX HACK It looks as though some of the symbols for
* monetary values returned by localeconv() can be multiple
* bytes/characters. This code assumes one byte only. - tgl 97/04/14
* XXX UNHACK Allow the currency symbol to be multi-byte.
* XXX UNHACK Allow the currency symbol to be multibyte.
* - thomas 1998-03-01
*/
Datum

View File

@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.52 2002/09/02 06:22:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.53 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,7 +93,7 @@ iwchareq(unsigned char *p1, unsigned char *p2)
return (0);
/*
* ok, p1 and p2 are both > CHARMAX, then they must be multi-byte
* ok, p1 and p2 are both > CHARMAX, then they must be multibyte
* characters
*/
l = pg_mblen(p1);

View File

@@ -3,8 +3,9 @@
* like_match.c
* like expression handling internal code.
*
* This file is included by like.c *twice* if multibyte is enabled.
* This is for an optimization of single byte encodings.
* This file is included by like.c *twice*, to provide an optimization
* for single-byte encodings.
*
* Before the inclusion, we need to define following macros:
*
* CHAREQ
@@ -18,7 +19,7 @@
* Copyright (c) 1996-2002, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like_match.c,v 1.3 2002/06/20 20:29:37 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like_match.c,v 1.4 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.8 2002/08/29 07:22:27 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.9 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,13 +64,9 @@ quote_literal(PG_FUNCTION_ARGS)
PG_RETURN_TEXT_P(result);
}
/*
* MULTIBYTE dependant internal functions follow
*
* Check if a given identifier needs quoting
*/
/* Check if a given identifier needs quoting (MULTIBYTE version) */
static bool
quote_ident_required(text *iptr)
{
@@ -106,7 +102,9 @@ quote_ident_required(text *iptr)
return false;
}
/* Return a properly quoted identifier (MULTIBYTE version) */
/*
* Return a properly quoted identifier
*/
static text *
do_quote_ident(text *iptr)
{
@@ -147,7 +145,9 @@ do_quote_ident(text *iptr)
return result;
}
/* Return a properly quoted literal value (MULTIBYTE version) */
/*
* Return a properly quoted literal value
*/
static text *
do_quote_literal(text *lptr)
{

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.115 2002/09/02 06:22:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.116 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3367,7 +3367,7 @@ make_greater_string(const Const *str_const)
/*
* Truncate off the last character, which might be more than 1
* byte in MULTIBYTE case.
* byte, depending on the character encoding.
*/
if (datatype != BYTEAOID && pg_database_encoding_max_length() > 1)
len = pg_mbcliplen((const unsigned char *) workstr, len, len - 1);

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.92 2002/08/29 07:22:27 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.93 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -350,8 +350,8 @@ name_bpchar(PG_FUNCTION_ARGS)
* Convert a C string to VARCHAR internal representation. atttypmod
* is the declared length of the type plus VARHDRSZ.
*
* Note that if MULTIBYTE is enabled, atttypmod is regarded as the
* number of characters, rather than number of bytes.
* Note that atttypmod is regarded as the number of characters, which
* is not necessarily the same as the number of bytes.
*
* If the C string is too long,
* raise an error, unless the extra characters are spaces, in which
@@ -450,7 +450,7 @@ varchar(PG_FUNCTION_ARGS)
{
size_t maxmblen;
/* truncate multi-byte string preserving multi-byte boundary */
/* truncate multibyte string preserving multibyte boundary */
maxmblen = pg_mbcharcliplen(VARDATA(source), len - VARHDRSZ,
maxlen - VARHDRSZ) + VARHDRSZ;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.90 2002/08/29 07:22:27 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.91 2002/09/03 21:45:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -412,9 +412,9 @@ textcat(PG_FUNCTION_ARGS)
* If the length is less than zero, return the remaining string.
*
* Note that the arguments operate on octet length,
* so not aware of multi-byte character sets.
* so not aware of multibyte character sets.
*
* Added multi-byte support.
* Added multibyte support.
* - Tatsuo Ishii 1998-4-21
* Changed behavior if starting position is less than one to conform to SQL92 behavior.
* Formerly returned the entire string; now returns a portion.
@@ -624,9 +624,6 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified)
* Implements the SQL92 POSITION() function.
* Ref: A Guide To The SQL Standard, Date & Darwen, 1997
* - thomas 1997-07-27
*
* Added multi-byte support.
* - Tatsuo Ishii 1998-4-21
*/
Datum
textpos(PG_FUNCTION_ARGS)