You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am copying features from a WFS source to a Postgres (with Postgis) database.
The data is copied, but data types are not always transferred correctly. It seems they are inferred from data and defaults to varchar if data is NULL.
This seems related to #1375.
With hints from there, I tried adding the --debug on flag. From the output, I can see that a request to the WFS-server is made with query parameter request=DescribeFeatureType (aside: this request is not logged if requesting data as json).
Trying the logged url in Postman, I can also see that the response says my column of interest is of type datetime.
Yet, as long as the field's value (this particular table has only 1 row) it is imported to Postgres as varchar.
If the value at the source is set to a value (timestamp is the source table's type), the import runs and the column is typed timestamptz (which is still not identical, but much better).
Steps to reproduce the problem.
Unfortunately, the WFS service itself is not public, so I can't share it here for further inspection.
The ogr2ogr call is similar to this:
Expected behavior and actual behavior.
I am copying features from a WFS source to a Postgres (with Postgis) database.
The data is copied, but data types are not always transferred correctly. It seems they are inferred from data and defaults to
varchar
if data isNULL
.This seems related to #1375.
With hints from there, I tried adding the
--debug on
flag. From the output, I can see that a request to the WFS-server is made with query parameterrequest=DescribeFeatureType
(aside: this request is not logged if requesting data as json).Trying the logged url in Postman, I can also see that the response says my column of interest is of type
datetime
.Yet, as long as the field's value (this particular table has only 1 row) it is imported to Postgres as
varchar
.If the value at the source is set to a value (
timestamp
is the source table's type), the import runs and the column is typedtimestamptz
(which is still not identical, but much better).Steps to reproduce the problem.
Unfortunately, the WFS service itself is not public, so I can't share it here for further inspection.
The ogr2ogr call is similar to this:
Operating system
macOS 10.14.6
GDAL version and provenance
3.2.0_1 via Homebrew
The text was updated successfully, but these errors were encountered: