Creating a table by loading a sql file.

From: rhodesm4 <rhodesm4(at)msu(dot)edu>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Creating a table by loading a sql file.
Date: 2017-10-27 04:55:59
Message-ID: DM3PR1201MB1119B73EFEF09A29F7510484955A0@DM3PR1201MB1119.namprd12.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

So I have this SQL code:

\c mydb;

CREATE TABLE USER(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
EMAIL TEXT NOT NULL,
PASSWORD TEXT NOT NULL,
);

INSERT INTO USER (name, email, password)
VALUES ('Tyler', 'tylerrobinson(at)whatver(dot)com', 'tyler');

And I keep getting these errors:

WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
psql:users.sql:10: ERROR: syntax error at or near "USER"
LINE 1: CREATE TABLE USER(
^
psql:users.sql:16: ERROR: syntax error at or near "USER"
LINE 1: INSERT INTO USER (name, email, password)
^

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim Gündüz 2017-10-27 08:18:12 Re: Creating a table by loading a sql file.
Previous Message Amit Langote 2017-10-27 00:49:16 Re: BUG #14873: table_constraint description missing in ALTER TABLE synopsis