OSDN Git Service

fix: clean up formatting of \d tablename in psql
authorMarc G. Fournier <scrappy@hub.org>
Tue, 16 Jul 1996 06:58:12 +0000 (06:58 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Tue, 16 Jul 1996 06:58:12 +0000 (06:58 +0000)
submitted by: Bruce Momjian (root@candle.pha.pa.us)

src/bin/psql/psql.c

index 76ca326..738827a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.2 1996/07/16 06:37:28 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.3 1996/07/16 06:58:12 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -321,9 +321,9 @@ tableDesc (PGconn* conn, char* table)
     */
 
     printf ("\nTable    = %s\n", table);
-    printf ("+----------------------------------+----------------------------------+-------+\n");
-    printf ("|              Field               |              Type                | Length|\n");
-    printf ("+----------------------------------+----------------------------------+-------+\n");
+    printf ("+----------------------------------+----------------------------------+--------+\n");
+    printf ("|              Field               |              Type                | Length |\n");
+    printf ("+----------------------------------+----------------------------------+--------+\n");
 
     /* next, print out the instances */
     for (i=0; i < PQntuples(res); i++) {
@@ -355,13 +355,13 @@ tableDesc (PGconn* conn, char* table)
              free(newname);
          }
        if (rsize > 0) 
-           printf ("%-6i |", rsize);
+           printf (" %-6i |", rsize);
        else
-           printf ("%-6s |", "var");
+           printf (" %-6s |", "var");
       }
       printf("\n");
     }
-    printf ("+----------------------------------+----------------------------------+-------+\n");
+    printf ("+----------------------------------+----------------------------------+--------+\n");
 
     PQclear(res);
     return (0);