pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

pgloader fails to import SQLite database with timestamp column

Open bnovc opened this issue 2 years ago • 1 comments

  • [ ] 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

bnovc avatar Aug 25 '23 18:08 bnovc

Same problem here...

rowild avatar Sep 06 '23 13:09 rowild