Skip to content

pgloader fails to import SQLite database with timestamp column #1523

@bnovc

Description

@bnovc
  • pgloader --version

    pgloader version "3.6.9"
    

compiled with SBCL 2.3.4
```

  • did you test a fresh compile from the source tree?

no - using latest version

  • did you search for other similar issues?

yes - many reports that are closed or unclear

  • how can I reproduce the bug?

    A SQLite database with the CREATE syntax from above

not using load files - I tried that, and they run without failing but no tables are created
  • pgloader output you obtain
2023-08-25T14:17:37.010194-04:00 LOG pgloader version "3.6.9"
2023-08-25T14:17:37.011417-04:00 LOG Data errors in '/private/tmp/pgloader/'
2023-08-25T14:17:37.048070-04:00 LOG Migrating from #<SQLITE-CONNECTION sqlite:///Users/..../Documents/./....20230823.db {700BA565B3}>
2023-08-25T14:17:37.048162-04:00 LOG Migrating into #<PGSQL-CONNECTION pgsql://....@UNIX:5432/... {700BC12C13}>
2023-08-25T14:17:37.124031-04:00 ERROR Database error 22007: invalid input syntax for type timestamp with time zone: "current_timestamp"
QUERY: CREATE TABLE queries 
(
  id          bigint,
  "user"      text,
  query       text,
  json        text,
  num_results int,
  ran_at      timestamptz default 'current_timestamp'
);
2023-08-25T14:17:37.124121-04:00 FATAL Failed to create the schema, see above.
2023-08-25T14:17:37.124150-04:00 LOG report summary reset
       table name     errors       rows      bytes      total time
-----------------  ---------  ---------  ---------  --------------
            fetch          0          0                     0.000s
  fetch meta data          0         16                     0.019s
   Create Schemas          0          0                     0.001s
 Create SQL Types          0          0                     0.002s
    Create tables          0          0                     0.000s
-----------------  ---------  ---------  ---------  --------------
-----------------  ---------  ---------  ---------  --------------
  • data that is being loaded, if relevant
PASTE HERE THE DATA THAT HAS BEEN LOADED
  • How the data is different from what you expected, if relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions