mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
Remove #ifdef MULTIBYTE per hackers list discussion.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.245 2002/08/28 20:46:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.246 2002/08/29 07:22:22 ishii Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -42,9 +42,7 @@
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/relcache.h"
|
||||
#include "utils/syscache.h"
|
||||
#ifdef MULTIBYTE
|
||||
#include "mb/pg_wchar.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* State shared by transformCreateSchemaStmt and its subroutines */
|
||||
@@ -634,12 +632,10 @@ makeObjectName(char *name1, char *name2, char *typename)
|
||||
name2chars--;
|
||||
}
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
if (name1)
|
||||
name1chars = pg_mbcliplen(name1, name1chars, name1chars);
|
||||
if (name2)
|
||||
name2chars = pg_mbcliplen(name2, name2chars, name2chars);
|
||||
#endif
|
||||
|
||||
/* Now construct the string using the chosen lengths */
|
||||
name = palloc(name1chars + name2chars + overhead + 1);
|
||||
|
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.100 2002/08/18 03:35:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.101 2002/08/29 07:22:23 ishii Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,10 +26,7 @@
|
||||
#include "parser/keywords.h"
|
||||
#include "parser/parse.h"
|
||||
#include "utils/builtins.h"
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
#include "mb/pg_wchar.h"
|
||||
#endif
|
||||
|
||||
/* No reason to constrain amount of data slurped */
|
||||
#define YY_READ_BUF_SIZE 16777216
|
||||
@@ -402,12 +399,9 @@ other .
|
||||
if (literallen >= NAMEDATALEN)
|
||||
{
|
||||
int len;
|
||||
#ifdef MULTIBYTE
|
||||
|
||||
len = pg_mbcliplen(literalbuf, literallen,
|
||||
NAMEDATALEN-1);
|
||||
#else
|
||||
len = NAMEDATALEN-1;
|
||||
#endif
|
||||
elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"",
|
||||
literalbuf, len, literalbuf);
|
||||
literalbuf[len] = '\0';
|
||||
@@ -562,11 +556,8 @@ other .
|
||||
if (i >= NAMEDATALEN)
|
||||
{
|
||||
int len;
|
||||
#ifdef MULTIBYTE
|
||||
|
||||
len = pg_mbcliplen(ident, i, NAMEDATALEN-1);
|
||||
#else
|
||||
len = NAMEDATALEN-1;
|
||||
#endif
|
||||
elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"",
|
||||
ident, len, ident);
|
||||
ident[len] = '\0';
|
||||
|
Reference in New Issue
Block a user