|
21 | 21 | *
|
22 | 22 | *
|
23 | 23 | * IDENTIFICATION
|
24 |
| - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.105 1999/05/10 00:46:18 momjian Exp $ |
| 24 | + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.106 1999/05/13 02:35:44 momjian Exp $ |
25 | 25 | *
|
26 | 26 | * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
27 | 27 | *
|
@@ -2671,6 +2671,10 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
|
2671 | 2671 | char**parentRels;/* list of names of parent relations */
|
2672 | 2672 | intnumParents;
|
2673 | 2673 | intactual_atts;/* number of attrs in this CREATE statment */
|
| 2674 | +int32tmp_typmod; |
| 2675 | +intprecision; |
| 2676 | +intscale; |
| 2677 | + |
2674 | 2678 |
|
2675 | 2679 | /* First - dump SEQUENCEs */
|
2676 | 2680 | if (tablename)
|
@@ -2749,6 +2753,18 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
|
2749 | 2753 | tblinfo[i].atttypmod[j]-VARHDRSZ);
|
2750 | 2754 | }
|
2751 | 2755 | }
|
| 2756 | +elseif (!strcmp(tblinfo[i].typnames[j],"numeric")) |
| 2757 | +{ |
| 2758 | +sprintf(q+strlen(q),"numeric"); |
| 2759 | +if (tblinfo[i].atttypmod[j]!=-1) |
| 2760 | +{ |
| 2761 | +tmp_typmod=tblinfo[i].atttypmod[j]-VARHDRSZ; |
| 2762 | +precision= (tmp_typmod >>16)&0xffff; |
| 2763 | +scale=tmp_typmod&0xffff; |
| 2764 | +sprintf(q+strlen(q),"(%d,%d)", |
| 2765 | +precision,scale); |
| 2766 | +} |
| 2767 | +} |
2752 | 2768 | /* char is an internal single-byte data type;
|
2753 | 2769 | * Let's make sure we force it through with quotes.
|
2754 | 2770 | * - thomas 1998-12-13
|
|