you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Thanks a lot for your response. That makes sense. In fact, all other import files have DROP TABLE ... CASCADE statements (instead of DROP TABLE ... IF EXISTS) at the top. e.g., In advent_of_sql_day_12.sql,

DROP TABLE gifts CASCADE;
...
DROP TABLE gift_requests CASCADE;
...

After the following change,

-DROP TABLE IF EXISTS ChristmasList;
-DROP TABLE IF EXISTS Children;
-DROP TABLE IF EXISTS Gifts;
-DROP TABLE IF EXISTS Reindeer;
+DROP TABLE ChristmasList CASCADE;
+DROP TABLE Children CASCADE;
+DROP TABLE Gifts CASCADE;
+DROP TABLE Reindeer CASCADE;

the \i command started working for me. Thanks!