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

Commitc2dd3c4

Browse files
committed
Fix for \d on long table names.
1 parentb20fd6c commitc2dd3c4

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

‎src/bin/psql/psql.c‎

Lines changed: 14 additions & 16 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.131 1998/01/28 20:44:28 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.132 1998/02/06 17:46:31 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -308,7 +308,7 @@ int
308308
tableList(PsqlSettings*pset,booldeep_tablelist,charinfo_type,
309309
boolsystem_tables)
310310
{
311-
charlistbuf[256];
311+
charlistbuf[512];
312312
intnColumns;
313313
inti;
314314
char*rk;
@@ -436,7 +436,7 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
436436
pclose(fout);
437437
pqsignal(SIGPIPE,SIG_DFL);
438438
}
439-
return(0);
439+
return0;
440440

441441
}
442442
else
@@ -458,7 +458,7 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
458458
fprintf(stderr,"Couldn't find any tables, sequences or indices!\n");
459459
break;
460460
}
461-
return(-1);
461+
return-1;
462462
}
463463
}
464464

@@ -469,7 +469,7 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type,
469469
int
470470
rightsList(PsqlSettings*pset)
471471
{
472-
charlistbuf[256];
472+
charlistbuf[512];
473473
intnColumns;
474474
inti;
475475
intusePipe=0;
@@ -537,12 +537,12 @@ rightsList(PsqlSettings *pset)
537537
pclose(fout);
538538
pqsignal(SIGPIPE,SIG_DFL);
539539
}
540-
return(0);
540+
return0;
541541
}
542542
else
543543
{
544544
fprintf(stderr,"Couldn't find any tables!\n");
545-
return(-1);
545+
return-1;
546546
}
547547
}
548548

@@ -556,7 +556,7 @@ rightsList(PsqlSettings *pset)
556556
int
557557
tableDesc(PsqlSettings*pset,char*table,FILE*fout)
558558
{
559-
chardescbuf[256];
559+
chardescbuf[512];
560560
intnColumns;
561561
char*rtype;
562562
char*rnotnull;
@@ -700,20 +700,18 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
700700
fprintf(fout,"\n");
701701
}
702702
fprintf(fout,"+----------------------------------+----------------------------------+-------+\n");
703-
704703
PQclear(res);
705704
if (usePipe)
706705
{
707706
pclose(fout);
708707
pqsignal(SIGPIPE,SIG_DFL);
709708
}
710-
return (0);
711-
709+
return0;
712710
}
713711
else
714712
{
715713
fprintf(stderr,"Couldn't find table %s!\n",table);
716-
return(-1);
714+
return-1;
717715
}
718716
}
719717

@@ -727,7 +725,7 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
727725
int
728726
objectDescription(PsqlSettings*pset,char*object,FILE*fout)
729727
{
730-
chardescbuf[256];
728+
chardescbuf[512];
731729
intnDescriptions;
732730
inti;
733731
PGresult*res;
@@ -886,13 +884,13 @@ objectDescription(PsqlSettings *pset, char *object, FILE *fout)
886884
pclose(fout);
887885
pqsignal(SIGPIPE,SIG_DFL);
888886
}
889-
return(0);
887+
return0;
890888

891889
}
892890
else
893891
{
894892
fprintf(stderr,"Couldn't find comments for object %s!\n",object);
895-
return(-1);
893+
return-1;
896894
}
897895
}
898896

@@ -907,7 +905,7 @@ gets_noreadline(char *prompt, FILE *source)
907905
{
908906
fputs(prompt,stdout);
909907
fflush(stdout);
910-
return(gets_fromFile(prompt,stdin));
908+
returngets_fromFile(prompt,stdin);
911909
}
912910

913911
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp