I am trying to insert a table specific sql dump into a database (psql). There is a table called "templates" which already has some values, and trying to dump new values. The sql file looks like below.
INSERT INTO templates (id, name, created_at, updated_at, template_path, page_type, container_type, entity_type, entity_id, asset_group_id, data_proxy_id, publisher_id, status, default, image_url_path, sequence) VALUES ('434', 'Full Width Image', '2018-10-25 11:13:35.695256', '2018-11-23 07:26:25.663427', '/templates/full_width_landscape', null, null, null, null, null, null, '655', 'true', 'true', 'template1', 1);
When I am trying to insert this sql file by doing
\i sql file path
I am getting the following error:
ERROR: syntax error at or near "default"
LINE 1: ...et_group_id, data_proxy_id, publisher_id, status, default, i...
Can someone tell what's wrong here ?
defaultis a reserved word in SQL. Use"default"instead, i.e. a delimited identifier.defaultis a reserved word in SQL. Use a different name, so you don't have conflicts with reserved words.