Re: Importing SQLite database

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Importing SQLite database
Дата
Msg-id 339fa54d-5000-57cc-126f-de7aa66735f3@aklaver.com
обсуждение исходный текст
Ответ на Re: Importing SQLite database  (Igor Korot <ikorot01@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Importing SQLite database
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: PDF files: to store in database or not