|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * 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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -405,6 +405,10 @@ tableDesc(PsqlSettings * ps, char *table)
|
405 | 405 |
|
406 | 406 | /* Build the query */
|
407 | 407 |
|
| 408 | +for(i=strlen(table);i >=0;i--) |
| 409 | +if (isupper(table[i])) |
| 410 | +table[i]=tolower(table[i]); |
| 411 | + |
408 | 412 | descbuf[0]='\0';
|
409 | 413 | strcat(descbuf,"SELECT a.attnum, a.attname, t.typname, a.attlen");
|
410 | 414 | strcat(descbuf," FROM pg_class c, pg_attribute a, pg_type t ");
|
@@ -1112,6 +1116,9 @@ HandleSlashCmds(PsqlSettings * settings,
|
1112 | 1116 |
|
1113 | 1117 | unescape(cmd,line+1);/* sets cmd string */
|
1114 | 1118 |
|
| 1119 | +if (strlen(cmd) >=1&&cmd[strlen(cmd)-1]==';')/* strip trailing ; */ |
| 1120 | +cmd[strlen(cmd)-1]='\0'; |
| 1121 | + |
1115 | 1122 | /*
|
1116 | 1123 | * Originally, there were just single character commands. Now, we define
|
1117 | 1124 | * some longer, friendly commands, but we have to keep the old single
|
@@ -1543,7 +1550,6 @@ MainLoop(PsqlSettings * settings, FILE * source)
|
1543 | 1550 | }
|
1544 | 1551 |
|
1545 | 1552 | slashCmdStatus=-1;
|
1546 |
| -/* slash commands have to be on their own line */ |
1547 | 1553 | if (!in_quote&&query_start[0]=='\\') {
|
1548 | 1554 | slashCmdStatus=HandleSlashCmds(settings,
|
1549 | 1555 | query_start,
|
|