Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
519ad246
Commit
519ad246
authored
May 13, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Here's a small patch to cause pg_dump to emit the
scale and precision for NUMERIC type column defs. Keith Parks
parent
0b885e23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+17
-1
No files found.
src/bin/pg_dump/pg_dump.c
View file @
519ad246
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.10
5 1999/05/10 00:46:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.10
6 1999/05/13 02:35:44
momjian Exp $
*
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
*
...
@@ -2671,6 +2671,10 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
...
@@ -2671,6 +2671,10 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
char
**
parentRels
;
/* list of names of parent relations */
char
**
parentRels
;
/* list of names of parent relations */
int
numParents
;
int
numParents
;
int
actual_atts
;
/* number of attrs in this CREATE statment */
int
actual_atts
;
/* number of attrs in this CREATE statment */
int32
tmp_typmod
;
int
precision
;
int
scale
;
/* First - dump SEQUENCEs */
/* First - dump SEQUENCEs */
if
(
tablename
)
if
(
tablename
)
...
@@ -2749,6 +2753,18 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
...
@@ -2749,6 +2753,18 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
tblinfo
[
i
].
atttypmod
[
j
]
-
VARHDRSZ
);
tblinfo
[
i
].
atttypmod
[
j
]
-
VARHDRSZ
);
}
}
}
}
else
if
(
!
strcmp
(
tblinfo
[
i
].
typnames
[
j
],
"numeric"
))
{
sprintf
(
q
+
strlen
(
q
),
"numeric"
);
if
(
tblinfo
[
i
].
atttypmod
[
j
]
!=
-
1
)
{
tmp_typmod
=
tblinfo
[
i
].
atttypmod
[
j
]
-
VARHDRSZ
;
precision
=
(
tmp_typmod
>>
16
)
&
0xffff
;
scale
=
tmp_typmod
&
0xffff
;
sprintf
(
q
+
strlen
(
q
),
"(%d,%d)"
,
precision
,
scale
);
}
}
/* char is an internal single-byte data type;
/* char is an internal single-byte data type;
* Let's make sure we force it through with quotes.
* Let's make sure we force it through with quotes.
* - thomas 1998-12-13
* - thomas 1998-12-13
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment