INSERT statemet quotes differs from CREATE when exporting data as SQL

Issue #198 invalid
Former user created an issue

Originally reported on Google Code with ID 198

What steps will reproduce the problem?
1.Export a table with data as default settings.

What is the expected output? What do you see instead?
CREATE statement uses single quotes for table name and fields but INSERT uses double
quotes for table and fields and single quotes for values. I think that INSERT should
use single quotes for all as CREATE statement or at least all must use the same quotes.

What version of the product are you using? On what operating system?
I'm using 1.9.4.

Which
Database Extension (PDO/SQLiteDatabase/SQLiteDatabase3 - see Database
structure-tab in phpLiteAdmin)?
I'm using PDO.

Reported by is2cool4me on 2013-03-21 10:42:09

Comments (2)

  1. Christopher Kramer
    That's correct behaviour:
    | CREATE statement uses single quotes for table name and fields
    It uses what you used when you created the table. It doesn't touch the original create
    table statement at all.
    Moreover, using single quotes in this context is correct, because when you create a
    table, the table name is a value, not a reference to an already existing db-object
    (because the table does not exist yet).
    
    | INSERT uses double quotes for table and fields
    Which is correct. See https://www.sqlite.org/lang_keywords.html .
    
    | single quotes for values.
    Which is correct. See https://www.sqlite.org/lang_keywords.html .
    

    Reported by crazy4chrissi on 2013-03-21 13:15:29 - Status changed: Invalid

  2. Former user Account Deleted
    Ok, sorry con the inconvenience.
    I've noticed the problem because when using the generated SQL I've needed change the
    double quotes to single quotes (instead of escape) to use inside a string. When warned
    about this I've think that was a problem not is real behavior..
    

    Reported by is2cool4me on 2013-03-21 15:54:19

  3. Log in to comment