[GRASS-user] v.in.ogr doesn't support Postgres Data Type timestamp
Markus Neteler
neteler at fbk.eu
Fri Nov 23 09:00:35 EST 2007
Düster Horst wrote on 11/23/2007 02:40 PM:
> v.in.ogr v.in.ogr doesn't support Postgres Data Type timestamp. When
> you try to import PostGIS layer with columns of type timestamp
> v.in.ogr reports the error p.e.:
>
> table xxx has 4 columns 6 values were supplied
>
> This example error happens when table xxx hat 2 colums of 6 columns
> with type timestamp. It seems that v.in.ogr detects the wrong number
> of columns.Isn't is possible to convert timestamp data to character data?
>
Horst,
please report the precise error, GRASS (and if applied QGIS) version
because:
db/drivers/postgres/
2005-10-18 16:11 markus
* create_table.c, fetch.c: error check for time zone presence in
TIMESTAMP type added; type datetime -> timestamp
bartok:postgres[19864.4] grep -i timestamp *
create_table.c: case DB_SQL_TYPE_TIMESTAMP:
create_table.c: db_append_string ( &sql, "timestamp");
db.c: "'time', 'date', 'timestamp', "
db.c: else if ( strcmp( PQgetvalue(res, row, 1), "timestamp" ) == 0 )
db.c: type = PG_TYPE_TIMESTAMP;
describe.c: case PG_TYPE_TIMESTAMP:
describe.c: *sqltype = DB_SQL_TYPE_TIMESTAMP;
fetch.c: case PG_TYPE_TIMESTAMP:
fetch.c: append_error ( "Cannot scan timestamp (no
idea how to process time zone):");
fetch.c: append_error ( "Cannot scan timestamp (not
enough arguments):");
globals.h: PG_TYPE_TIMESTAMP, /* timestamp */
In general, 'time', 'date', 'timestamp' are supported.
It seems that "table xxx has 4 columns 6 values were supplied"
does not originate from PG driver, nor v.in.ogr nor Vectlib.
Markus
More information about the grass-user
mailing list