Ticket #1389 (closed defect: fixed)
problem w/ date fields using ogr2ogr to load shapefile into postgis
| Reported by: | john.c.cartwright@… | Owned by: | mloskot |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.1 |
| Component: | OGR_SF | Version: | 1.3.2 |
| Severity: | normal | Keywords: | |
| Cc: | warmerdam, neteler |
Description (last modified by warmerdam) (diff)
the SQL generated by ogr2ogr seems to be truncating the date field. The record has the correct date using "ogrinfo -al". Problem reproduced on linux (RHEL WS 4) and Mac (10.4). Sample shapefile available at http://mapdevel.ngdc.noaa.gov/sample.tar
e.g.
lynx:/usr/local/shapefiles jcc$ ogr2ogr -f postgresql -a_srs EPSG:4326
PG:dbname=jcc -overwrite osmc.shp
ERROR 1: INSERT command for new feature failed.
ERROR: invalid input syntax for type date: "2006/12/"
Command: INSERT INTO "osmc" (wkb_geometry , "platform_i", "max_observ",
"observatio", "platform_t", "num_observ", "objectid") VALUES
(GeomFromEWKT('SRID=4326;POINT (-29.30999999999991
-41.889999999999972)'::TEXT) , '33627', '2006/12/', '2006/12/',
'DRIFTING BUOY', 133, 7469241)
ERROR 1: Terminating translation prematurely after failed
translation of layer osmc
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

