projects
/
psqlodbc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15e1630
)
Fix default numeric precision.
author
Dave Page
<dpage@pgadmin.org>
Fri, 5 Aug 2005 12:19:48 +0000
(12:19 +0000)
committer
Dave Page
<dpage@pgadmin.org>
Fri, 5 Aug 2005 12:19:48 +0000
(12:19 +0000)
connection.c
patch
|
blob
|
blame
|
history
diff --git
a/connection.c
b/connection.c
index e4b05ce6a7c818db813e8a22b2bccf9d60c24c6b..2cb06b08b3ce86e3c1bf8a8f532b650b1958cd9e 100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-3239,7
+3239,12
@@
CC_mapping(PGresult *pgres,QResultClass *qres)
{
typid = PQftype(pgres,i);
atttypmod = PQfmod(pgres,i);
- typlen = PQfsize(pgres,i);
+
\r
+ if (PG_TYPE_NUMERIC == typid)
\r
+ typlen = ((atttypmod - 4) >> 16) & 0xffff;
\r
+ else
\r
+ typlen = PQfsize(pgres,i);
\r
+
if(typlen == -1 || PG_TYPE_VARCHAR == typid)
typlen = MAX_VARCHAR_SIZE;
switch (typid)