aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2002-09-03 21:45:44 +0000
committerPeter Eisentraut <peter_e@gmx.net>2002-09-03 21:45:44 +0000
commit77f7763b55a89254f3b4be1f92402188bf2575b8 (patch)
tree95af88df05d1251ee25dd28cf826c664748daa14 /src/backend/utils/adt
parent86f27321e25b5a1a7b6c78400e54f063525b07d5 (diff)
downloadpostgresql-77f7763b55a89254f3b4be1f92402188bf2575b8.tar.gz
postgresql-77f7763b55a89254f3b4be1f92402188bf2575b8.zip
Remove all traces of multibyte and locale options. Clean up comments
referring to "multibyte" where it really means character encoding.
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r--src/backend/utils/adt/cash.c4
-rw-r--r--src/backend/utils/adt/like.c4
-rw-r--r--src/backend/utils/adt/like_match.c7
-rw-r--r--src/backend/utils/adt/quote.c16
-rw-r--r--src/backend/utils/adt/selfuncs.c4
-rw-r--r--src/backend/utils/adt/varchar.c8
-rw-r--r--src/backend/utils/adt/varlena.c9
7 files changed, 25 insertions, 27 deletions
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index e4d6350e815..3664a6053f4 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -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
diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c
index fab47e37fa2..fca4fc77b30 100644
--- a/src/backend/utils/adt/like.c
+++ b/src/backend/utils/adt/like.c
@@ -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);
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index 54ac32dcc53..60bc186c7e0 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -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 $
*
*-------------------------------------------------------------------------
*/
diff --git a/src/backend/utils/adt/quote.c b/src/backend/utils/adt/quote.c
index 97946866d01..d41856c8478 100644
--- a/src/backend/utils/adt/quote.c
+++ b/src/backend/utils/adt/quote.c
@@ -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)
{
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index dc0b520b925..44037b1a376 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -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);
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index e1181dd375f..819e3122c3c 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -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;
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 6e00a3e2835..12230a70655 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -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)