Select to view content in your preferred language

Problem with double field type in postgis database

1027
4
12-15-2013 11:45 PM
MilosIlic
Emerging Contributor
I have connection to PostGis database through ArcSDE, and all double type numeric fields are cutting numbers after comma. For example, instead 255,11 i have in my field 255. Does anyone know how can i fix this problem?
0 Kudos
4 Replies
WilliamCraft
MVP Regular Contributor
I have connection to PostGis database through ArcSDE, and all double type numeric fields are cutting numbers after comma. For example, instead 255,11 i have in my field 255. Does anyone know how can i fix this problem?


Can you please be more specific about the issue you're seeing?  You should also provide the version of ArcSDE, ArcGIS, etc. you are using along with the exact version of the RDBMS.  With regard to the issue you're facing, it seems like you indicate that the fields in question are numeric (DOUBLE, to be specific)... then you mention "255" and "11"; are you saying that 255 is your precision and 11 is your scale?  If you explore the tables directly from a database management tool, do you see the same behavior as you see from ArcGIS Desktop?
0 Kudos
MilosIlic
Emerging Contributor
Sorry, i am using arcgis desktop 10.0 and arcsde also 10.0...in my database i have point feature class  with field type double where i
store the height of point. So, as i said field is double with lenght 38 and precision 8.
When i mention "255.11", that was just example, if i create new point and want to type "255.11" in the table i can see only "255".
When i approach to table through pgadmin i also see the same as in table from ArcMap and ArcCatalog view.

Kind regards
0 Kudos
WilliamCraft
MVP Regular Contributor
Ok, now I see more of what you're saying.  At the PostgreSQL level, what version of the RDBMS are you using and which PostgreSQL data type are you using for that field? 

http://www.postgresql.org/docs/9.1/static/datatype-numeric.html
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002p0000006p000000

If you said DOUBLE in ArcGIS, then it's probably a NUMERIC data type in PostgreSQL.  Are you certain that your precision and scale in PostgreSQL are set to 38 and 8, respectively?
0 Kudos
MilosIlic
Emerging Contributor
Yes the field in NUMERIC(38,8), when you create field double in ArcCatalog, it's automatically create numeric field on postGis level.
For RDBMS i am not sure, and don't know how to check that.
0 Kudos