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

intelmq_psql_initdb does not work for SQLite #2202

Open
sebix opened this issue Jul 4, 2022 · 3 comments
Open

intelmq_psql_initdb does not work for SQLite #2202

sebix opened this issue Jul 4, 2022 · 3 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: bots documentation Indicates a need for improvements or additions to documentation

Comments

@sebix
Copy link
Member

sebix commented Jul 4, 2022

The SQL output bot documentation says, the SQLite database can be initialized with the intelmq_psql_initdb's initdb.sql:

intelmq/docs/user/bots.rst

Lines 4089 to 4094 in 79cae29

Create the new database (you can ignore all errors since SQLite doesn't know all SQL features generated for PostgreSQL):
.. code-block:: bash
sqlite3 your-db.db
sqlite> .read /tmp/initdb.sql

However, that does not work:

sqlite> .read /tmp/initdb.sql
Parse error near line 86: near "USING": syntax error
   "idx_events_classification.identifier" ON events USING btree ("classification
                                      error here ---^
[etc... for all indices]
@sebix sebix added bug Indicates an unexpected problem or unintended behavior documentation Indicates a need for improvements or additions to documentation component: bots labels Jul 4, 2022
@aaronkaplan
Copy link
Member

okay, so would it need an intelmq_sqlite_initdb then?

@sebix
Copy link
Member Author

sebix commented Jul 13, 2022

Or a generic command, and a parameter to switch between databases, e.g. intelmq.bots.outputs.sql.output --generate-initdb --sqlite.

@aaronkaplan
Copy link
Member

aaronkaplan commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots documentation Indicates a need for improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants