Re: Creating a table by loading a sql file.

From: Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: rhodesm4 <rhodesm4(at)msu(dot)edu>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Creating a table by loading a sql file.
Date: 2017-11-02 09:57:08
Message-ID: CACACo5TN_0b-cFXDiiYO_Y4OFn7gono7tvE0_Mn4TA+SQq7P7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Oct 27, 2017 at 10:18 AM, Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:

>
> Hi,
>
> On Fri, 2017-10-27 at 04:55 +0000, rhodesm4 wrote:
> > psql:users.sql:10: ERROR: syntax error at or near "USER"
> > LINE 1: CREATE TABLE USER(
>
> USER is a reserved keyword in PostgreSQL:
>
> https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
>
> You need to change the table name.
>

Or put double-quotes around the name: CREATE TABLE "USER"...

--
Alex

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message k.daskalov.911 2017-11-02 09:57:19 BUG #14885: mistake in sorting win1251 chars
Previous Message sathishr 2017-11-02 07:57:06 BUG #14884: Encoding Error