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

Commitbf09f8a

Browse files
committed
Display numeric precision on \d.
1 parente752861 commitbf09f8a

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
elseif (strcmp(rtype,"bpchar")==0||
877877
strcmp(rtype,"varchar")==0)
878878
fprintf(fout,"%6i |",atttypmod!=-1 ?atttypmod-VARHDRSZ :0);
879+
elseif (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)

[8]ページ先頭

©2009-2025 Movatter.jp