diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-08-29 05:07:03 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-08-29 05:07:03 +0000 |
commit | b6b71b85bc45b49005b5aec87cba2c33fc8baf49 (patch) | |
tree | c23dbd1dbc43972a8e48327c8a771baf36952f3d /src/backend/parser/scansup.c | |
parent | 90cb9c305140684b2b00c739b724f67915e11404 (diff) | |
download | postgresql-b6b71b85bc45b49005b5aec87cba2c33fc8baf49.tar.gz postgresql-b6b71b85bc45b49005b5aec87cba2c33fc8baf49.zip |
Pgindent run for 8.0.
Diffstat (limited to 'src/backend/parser/scansup.c')
-rw-r--r-- | src/backend/parser/scansup.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c index 11d918b7d81..2bbce5ef139 100644 --- a/src/backend/parser/scansup.c +++ b/src/backend/parser/scansup.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/scansup.c,v 1.27 2004/08/29 04:12:42 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/scansup.c,v 1.28 2004/08/29 05:06:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -133,18 +133,19 @@ downcase_truncate_identifier(const char *ident, int len, bool warn) int i; result = palloc(len + 1); + /* - * SQL99 specifies Unicode-aware case normalization, which we don't yet - * have the infrastructure for. Instead we use tolower() to provide a - * locale-aware translation. However, there are some locales where this - * is not right either (eg, Turkish may do strange things with 'i' and - * 'I'). Our current compromise is to use tolower() for characters with - * the high bit set, and use an ASCII-only downcasing for 7-bit - * characters. + * SQL99 specifies Unicode-aware case normalization, which we don't + * yet have the infrastructure for. Instead we use tolower() to + * provide a locale-aware translation. However, there are some + * locales where this is not right either (eg, Turkish may do strange + * things with 'i' and 'I'). Our current compromise is to use + * tolower() for characters with the high bit set, and use an + * ASCII-only downcasing for 7-bit characters. */ for (i = 0; i < len; i++) { - unsigned char ch = (unsigned char) ident[i]; + unsigned char ch = (unsigned char) ident[i]; if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A'; @@ -174,12 +175,12 @@ truncate_identifier(char *ident, int len, bool warn) { if (len >= NAMEDATALEN) { - len = pg_mbcliplen(ident, len, NAMEDATALEN-1); + len = pg_mbcliplen(ident, len, NAMEDATALEN - 1); if (warn) ereport(NOTICE, (errcode(ERRCODE_NAME_TOO_LONG), - errmsg("identifier \"%s\" will be truncated to \"%.*s\"", - ident, len, ident))); + errmsg("identifier \"%s\" will be truncated to \"%.*s\"", + ident, len, ident))); ident[len] = '\0'; } } |