I added a file to postgres using \i /path/to/some/file.sql
but there was a typo in the file.
Here's what I had in the file:
CREATE VIEW holidays AS
SELECT event_id AS holiday_id, title AS name, starts AS date
FROM events
WHERE title LIKE '%Day%' AND venue_id IS NULL;
In the original version I had %DAY%
. When running \i /path/to/some/file.sql
again, I receive this error:
ERROR: relation "holidays" already exists
How do I undo this relation to get the code to run again?
Thanks