#3667 closed defect (fixed)
Handle Nan, Infinite and -Infinite numeric values in pg driver
Reported by: | chaitanya | Owned by: | chaitanya |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.3 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | pg |
Cc: | warmerdam |
Description
The pg driver is crashing when the numeric value NaN is being inserted. These special cases should be enclosed in single quotes.
Change History (5)
comment:1 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 13 years ago
Milestone: | 1.6.4 → 1.7.3 |
---|
- r19973 /trunk/autotest/ogr/ogr_pg.py: Compatibility fix for Python < 2.6 and Python > 2.6
- r19974 /trunk/gdal/ogr/ogrsf_frmts/pg/ogrpgtablelayer.cpp: PG driver: handling of Nan & Infinity : remove special case for OFTInteger and OFTIntegerList, fix for OFTRealList in COPY mode (#3667)
- r19975 /branches/1.7/gdal/ogr/ogrsf_frmts/pg/ogrpgtablelayer.cpp: PG driver: handling of Nan & Infinity : remove special case for OFTInteger and OFTIntegerList, fix for OFTRealList in COPY mode (#3667)
- r19976 /trunk/autotest/ogr/ogr_pg.py: PG driver : Add test for NaN values in OFTRealList fields (#3667)
comment:3 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to rouault:
Thanks Even. I overlooked the OFTRealList format. However, I think OFTInteger values should be quoted for NaN because the SQL parser will look for a column named "nan". What do you think?
I'll incorporate your changes into the 1.7 branch.
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:5 by , 13 years ago
I thought signed integers had a representation for NaN in some representations. I misremembered.
Note:
See TracTickets
for help on using tickets.
Corrected pg driver in trunk (r19971) and 1.7 branch (r19972). I'm not touching the 1.6 branch as there have been too many changes.