MerginMaps / MerginMaps/db-sync

Converting PostgreSQL type timestamp with time zone to base type unsuccessful

Open
#132 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
53
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing db-sync initialization with the PostgreSQL table containing a timestamp with time zone field. Trace the PostgreSQL type conversion and GeoDiff copy handling reported in the error output. Done means creating the GPKG succeeds and the timestamp field is transferred without the unknown value type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.