MerginMaps / MerginMaps/db-sync
Converting PostgreSQL type timestamp with time zone to base type unsuccessful
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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