Re: ​ERROR: syntax error at or near "collation"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: dbatoCloud Solution <dbatocloud17(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ​ERROR: syntax error at or near "collation"
Date: 2022-01-14 03:58:47
Message-ID: CAKFQuwbnktfh-VrPUwXeSV4woWUxMxxYeG633Ch-k-U7EaOP1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thursday, January 13, 2022, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:

> On Thursday, January 13, 2022, dbatoCloud Solution <dbatocloud17(at)gmail(dot)com>
> wrote:
>
>>
>> Hi All,
>>
>> I am getting the below error while executing sql file in postgresql ? Can
>> somebody suggest plz?
>>
>>
>> SET
>> psql:comsod_db_structure.sql:48: ERROR: syntax error at or near
>> "collation"
>>
>> LINE 37: collation varchar(100)
>>
>
> Don’t use reserved words as column names.
>
>
Precisely…the word being complained about, “collation”, is reserved [1].
Rename the column or double-quote it.

[1] https://www.postgresql.org/docs/current/sql-keywords-appendix.html

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2022-01-14 07:17:14 Re: database encoding and collation.
Previous Message David G. Johnston 2022-01-14 03:43:27 Re: ​ERROR: syntax error at or near "collation"