Skip to content

Commit bf09f8a

Browse files
committed
Display numeric precision on \d.
1 parent e752861 commit bf09f8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/psql/psql.c

Lines changed: 5 additions & 1 deletion
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.179 1999/05/25 16:13:17 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.180 1999/05/26 20:08:06 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -876,6 +876,10 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
876876
else if (strcmp(rtype, "bpchar") == 0 ||
877877
strcmp(rtype, "varchar") == 0)
878878
fprintf(fout, "%6i |", atttypmod != -1 ? atttypmod - VARHDRSZ : 0);
879+
else if (strcmp(rtype, "numeric") == 0)
880+
fprintf(fout, "%3i.%-2i |",
881+
((atttypmod - VARHDRSZ) >> 16) & 0xffff,
882+
(atttypmod - VARHDRSZ) & 0xffff);
879883
else
880884
{
881885
if (attlen > 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy