1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Hi, here are the patches to enhance existing MB handling. This time

I have implemented a framework of encoding translation between the
backend and the frontend. Also I have added a new variable setting
command:

SET CLIENT_ENCODING TO 'encoding';

Other features include:
	Latin1 support more 8 bit cleaness

See doc/README.mb for more details. Note that the pacthes are
against May 30 snapshot.

Tatsuo Ishii
This commit is contained in:
Bruce Momjian
1998-06-16 07:29:54 +00:00
parent 0d8e7f6381
commit cb7cbc16fa
37 changed files with 1115 additions and 341 deletions

View File

@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.21 1998/06/15 19:28:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.22 1998/06/16 07:29:25 momjian Exp $
*/
#define FLEX_SCANNER
@ -555,7 +555,7 @@ char *yytext;
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.21 1998/06/15 19:28:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.22 1998/06/16 07:29:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1178,7 +1178,8 @@ YY_RULE_SETUP
BEGIN(xm);
for(i = 0; yytext[i]; i++)
if (isupper(yytext[i]))
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
keyword = ScanKeywordLookup((char*)yytext);
@ -1194,7 +1195,7 @@ YY_RULE_SETUP
YY_BREAK
case 34:
YY_RULE_SETUP
#line 336 "scan.l"
#line 337 "scan.l"
{
char* endptr;
@ -1216,7 +1217,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
#line 354 "scan.l"
#line 355 "scan.l"
{
char* endptr;
@ -1231,7 +1232,7 @@ YY_RULE_SETUP
YY_BREAK
case 36:
YY_RULE_SETUP
#line 365 "scan.l"
#line 366 "scan.l"
{
char* endptr;
@ -1252,7 +1253,7 @@ YY_RULE_SETUP
YY_BREAK
case 37:
YY_RULE_SETUP
#line 382 "scan.l"
#line 383 "scan.l"
{
char* endptr;
@ -1266,13 +1267,14 @@ YY_RULE_SETUP
YY_BREAK
case 38:
YY_RULE_SETUP
#line 394 "scan.l"
#line 395 "scan.l"
{
int i;
ScanKeyword *keyword;
for(i = 0; yytext[i]; i++)
if (isupper(yytext[i]))
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
keyword = ScanKeywordLookup((char*)yytext);
@ -1288,20 +1290,20 @@ YY_RULE_SETUP
YY_BREAK
case 39:
YY_RULE_SETUP
#line 412 "scan.l"
#line 414 "scan.l"
{ /* ignore */ }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 414 "scan.l"
#line 416 "scan.l"
{ return (yytext[0]); }
YY_BREAK
case 41:
YY_RULE_SETUP
#line 416 "scan.l"
#line 418 "scan.l"
ECHO;
YY_BREAK
#line 1305 "lex.yy.c"
#line 1307 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(xb):
case YY_STATE_EOF(xc):
@ -2187,7 +2189,7 @@ int main()
return 0;
}
#endif
#line 416 "scan.l"
#line 418 "scan.l"
void yyerror(char message[])

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.39 1998/05/09 23:15:20 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.40 1998/06/16 07:29:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -320,7 +320,8 @@ other .
BEGIN(xm);
for(i = 0; yytext[i]; i++)
if (isupper(yytext[i]))
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
keyword = ScanKeywordLookup((char*)yytext);
@ -396,7 +397,8 @@ other .
ScanKeyword *keyword;
for(i = 0; yytext[i]; i++)
if (isupper(yytext[i]))
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
keyword = ScanKeywordLookup((char*)yytext);