Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit43deb7a

Browse files
committed
Fox case-sensitivity for \d and allow trailing ; on backslash commands.
1 parent1952f15 commit43deb7a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎src/backend/parser/scan.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.12 1997/03/02 01:03:16 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.13 1997/06/29 17:29:14 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -167,7 +167,7 @@ other.
167167
int i;
168168
ScanKeyword*keyword;
169169

170-
for(i =0; i<strlen(yytext); i++)
170+
for(i =strlen(yytext); i>=0; i--)
171171
if (isupper(yytext[i]))
172172
yytext[i] =tolower(yytext[i]);
173173

‎src/bin/psql/psql.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.75 1997/06/2905:06:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.76 1997/06/2917:29:28 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -405,6 +405,10 @@ tableDesc(PsqlSettings * ps, char *table)
405405

406406
/* Build the query */
407407

408+
for(i=strlen(table);i >=0;i--)
409+
if (isupper(table[i]))
410+
table[i]=tolower(table[i]);
411+
408412
descbuf[0]='\0';
409413
strcat(descbuf,"SELECT a.attnum, a.attname, t.typname, a.attlen");
410414
strcat(descbuf," FROM pg_class c, pg_attribute a, pg_type t ");
@@ -1112,6 +1116,9 @@ HandleSlashCmds(PsqlSettings * settings,
11121116

11131117
unescape(cmd,line+1);/* sets cmd string */
11141118

1119+
if (strlen(cmd) >=1&&cmd[strlen(cmd)-1]==';')/* strip trailing ; */
1120+
cmd[strlen(cmd)-1]='\0';
1121+
11151122
/*
11161123
* Originally, there were just single character commands. Now, we define
11171124
* some longer, friendly commands, but we have to keep the old single
@@ -1543,7 +1550,6 @@ MainLoop(PsqlSettings * settings, FILE * source)
15431550
}
15441551

15451552
slashCmdStatus=-1;
1546-
/* slash commands have to be on their own line */
15471553
if (!in_quote&&query_start[0]=='\\') {
15481554
slashCmdStatus=HandleSlashCmds(settings,
15491555
query_start,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp