db-sync icon indicating copy to clipboard operation
db-sync copied to clipboard

Converting PostgreSQL type timestamp with time zone to base type unsuccessful

Open vdinh1 opened this issue 2 years ago • 1 comments

Hi, I am doing some testing with db-sync and I have found the issue below with initiating db-sync from postgresql.

What is the issue: Error creating a gpkg from postgresql layers

How to replicate: I have a table with a date field defined as follow : survey_date timestamp with time zone Eg.

Create` table survey (
   id text,
   survey_name text,
   survey_date timestamp with time zone
);

Error:

The base schema and the output GPKG do not exist yet, going to initialize them ...
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Warn: Converting PostgreSQL type timestamp with time zone to base type unsuccessful, using text.
survey_v01  | Error: copy failed!
survey_v01  | GEODIFF: Error: unknown value type: timestamp with time zone

vdinh1 avatar Nov 28 '23 07:11 vdinh1

Thanks for the report. As a temporary workaround, you could use timestamp without time zone column type which should work fine...

wonder-sk avatar Dec 07 '23 12:12 wonder-sk