Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daos: Avoid double quotes for string literals #1489

Merged
merged 2 commits into from
Jul 6, 2024
Merged

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Jul 6, 2024

SQLite, MySQL but not PostgreSQL support using double quotes for string literals in some places. This is generally considered a bad practice and SQLite recommends disabling the feature, which FreeBSD does, resulting in an error on startup:

no such column: table

Let’s fix the syntax to use ANSI SQL quoting style.

Fixes: #1488

They use invalid syntax (see the following commit) and were never used.
Copy link

netlify bot commented Jul 6, 2024

Deploy Preview for selfoss canceled.

Name Link
🔨 Latest commit 7ba724a
🔍 Latest deploy log https://app.netlify.com/sites/selfoss/deploys/6688fb30bab8190008390fd9

SQLite (https://www.sqlite.org/quirks.html#dblquote),
MySQL (https://dev.mysql.com/doc/refman/5.7/en/string-literals.html)
but not PostgreSQL (https://dev.mysql.com/doc/refman/5.7/en/string-literals.html)
support using double quotes for string literals in some places.
This is generally considered a bad practice and SQLite recommends disabling the feature:
https://www.sqlite.org/compile.html#recommended_compile_time_options
which FreeBSD does, resulting in an error on startup:

    no such column: table

Let’s fix the syntax to use ANSI SQL quoting style.
@jtojnar jtojnar added this to the 2.20 milestone Jul 6, 2024
@jtojnar jtojnar added the bug label Jul 6, 2024
@jtojnar jtojnar merged commit 7ba724a into master Jul 6, 2024
14 checks passed
@jtojnar jtojnar deleted the sqlite-string-literals branch July 6, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't create a new sqlite3 database in selfoss 2.19 on FreeBSD.
1 participant