Re: Importing SQLite database - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Importing SQLite database
Date
Msg-id 339fa54d-5000-57cc-126f-de7aa66735f3@aklaver.com
Whole thread Raw
In response to Re: Importing SQLite database  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
On 12/08/2016 07:02 AM, Igor Korot wrote:
> Adrian,
>


> Anything else you see?
> Does Postgres uses single quotes for literal values or double quotes?

Single:

https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html

> I'm talking about
> INSERT INTO... VALUES(); statements.
>
> SQLite does use double quotes, but I already cleaned it using single ones.

That may be going away:

http://sqlite.org/lang_keywords.html

"For resilience when confronted with historical SQL statements, SQLite
will sometimes bend the quoting rules above:

     If a keyword in single quotes (ex: 'key' or 'glob') is used in a
context where an identifier is allowed but where a string literal is not
allowed, then the token is understood to be an identifier instead of a
string literal.

     If a keyword in double quotes (ex: "key" or "glob") is used in a
context where it cannot be resolved to an identifier but where a string
literal is allowed, then the token is understood to be a string literal
instead of an identifier.

Programmers are cautioned not to use the two exceptions described in the
previous bullets. We emphasize that they exist only so that old and
ill-formed SQL statements will run correctly. Future versions of SQLite
might raise errors instead of accepting the malformed statements covered
by the exceptions above."

>
> Thank you.
>



--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Importing SQLite database
Next
From: Rich Shepard
Date:
Subject: Re: PDF files: to store in database or not