mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Fix scanner name length trimming.
This commit is contained in:
parent
53916cab6a
commit
2618fcdf0d
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.55 1998/08/29 04:09:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.56 1998/08/29 05:27:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -146,6 +146,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* if we elog() out, the file stays open */
|
||||
fp = AllocateFile(filename, "r");
|
||||
if (fp == NULL)
|
||||
elog(ERROR, "COPY command, running in backend with "
|
||||
@ -173,6 +174,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
|
||||
mode_t oumask; /* Pre-existing umask value */
|
||||
|
||||
oumask = umask((mode_t) 0);
|
||||
/* if we elog() out, the file stays open */
|
||||
fp = AllocateFile(filename, "w");
|
||||
umask(oumask);
|
||||
if (fp == NULL)
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.41 1998/08/29 02:36:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.42 1998/08/29 05:27:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -323,8 +323,8 @@ other .
|
||||
if (isascii((unsigned char)yytext[i]) &&
|
||||
isupper(yytext[i]))
|
||||
yytext[i] = tolower(yytext[i]);
|
||||
if (i > NAMEDATALEN)
|
||||
yytext[NAMEDATALEN] = '\0';
|
||||
if (i >= NAMEDATALEN)
|
||||
yytext[NAMEDATALEN-1] = '\0';
|
||||
|
||||
keyword = ScanKeywordLookup((char*)yytext);
|
||||
if (keyword != NULL) {
|
||||
@ -402,8 +402,8 @@ other .
|
||||
if (isascii((unsigned char)yytext[i]) &&
|
||||
isupper(yytext[i]))
|
||||
yytext[i] = tolower(yytext[i]);
|
||||
if (i > NAMEDATALEN)
|
||||
yytext[NAMEDATALEN] = '\0';
|
||||
if (i >= NAMEDATALEN)
|
||||
yytext[NAMEDATALEN-1] = '\0';
|
||||
|
||||
keyword = ScanKeywordLookup((char*)yytext);
|
||||
if (keyword != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user