You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sqlite3def returns error when an input DDL includes double-quoted table names.
I found the error on sqlite3(sometimes sqlite appends double quotes to their DDL automatically, I don't know why but it does so).
However ANSI SQL supports double quoted identifiers, so I guess it might be caused on other DBs(but I have not tested on MySQL and PostgreSQL).
I hope it will cause no errors with double quoted identifiers.
--export output
CREATETABLE "test_table" (id integerprimary key);
Input SQL
CREATETABLE "test_table" (id integerprimary key);
Current output
found syntax error when parsing DDL "CREATE TABLE "test_table" (id integer primary key)": syntax error at position 26 near 'test_table'
exit status 1
Package: sqlite3
Version: 3.31.1-4ubuntu0.2
Priority: optional
Section: misc
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 2803 kB
Depends: libc6 (>= 2.29), libreadline8 (>= 6.0), zlib1g (>= 1:1.2.0), libsqlite3-0 (= 3.31.1-4ubuntu0.2)
Suggests: sqlite3-doc
Homepage: https://www.sqlite.org/
Download-Size: 860 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
Description: Command line interface for SQLite 3
SQLite is a C library that implements an SQL database engine.
Programs that link with the SQLite library can have SQL database
access without running a separate RDBMS process.
Installed on WSL2 Ubuntu 20.04 on Windows10(x64) host.
How to reproduce the DDL
CREATETABLEtest_table (id integerprimary key);
ALTERTABLE test_table RENAME TO test_table2;
ALTERTABLE test_table2 RENAME TO test_table;
I don't know why, but sqlite3 appends double quotes when I rename a table name.
The text was updated successfully, but these errors were encountered:
minoritea
changed the title
errors when a table name in DDL is double-quoted
[sqlite3def] errors when a table name in DDL is double-quoted
Apr 21, 2021
sqlite3def
returns error when an input DDL includes double-quoted table names.I found the error on sqlite3(sometimes sqlite appends double quotes to their DDL automatically, I don't know why but it does so).
However ANSI SQL supports double quoted identifiers, so I guess it might be caused on other DBs(but I have not tested on MySQL and PostgreSQL).
I hope it will cause no errors with double quoted identifiers.
--export output
Input SQL
Current output
Expected output
sqldef version
SQLite3 version
Installed on WSL2 Ubuntu 20.04 on Windows10(x64) host.
How to reproduce the DDL
I don't know why, but sqlite3 appends double quotes when I rename a table name.
The text was updated successfully, but these errors were encountered: