pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

timestampz

Open Afwas opened this issue 9 years ago • 3 comments

While converting a SQLite database pgloader tries to create a PostgreSQL table row with type timestampz. That should be timestamptz.

2017-02-27T18:29:23.527000Z ERROR Database error 42704: type "timestampz" does not exist
QUERY: CREATE TABLE player_stats 
(
  id                     bigint,
...
  datetime               timestampz,
...
);
2017-02-27T18:29:23.528000Z FATAL Failed to create the schema, see above.```

Afwas avatar Feb 27 '17 18:02 Afwas

I see you closed the issue, should I still have a look?

dimitri avatar Feb 27 '17 21:02 dimitri

No. Turned out I caused the error myself. To clarify: The SQLite database had a text field for date. In order to import into PostgreSQL I copied the database in SQLite into one with field timestampz (sic). During import I ran into the issue as reported and looked into the pgloader code for the conversion. Hence the bug report. Upon inspection of the SQL file I used I saw I made the error myself. It's been a long day ...

Afwas avatar Feb 27 '17 21:02 Afwas

Ah yes, I forgot SQLite didn't check the type names at all... thanks for clarification!

dimitri avatar Feb 27 '17 21:02 dimitri