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

Implement the table_list pragma #1005

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

glommer
Copy link
Contributor

@glommer glommer commented Feb 14, 2025

SQLite queries the schema tables to implement this, so that tables can be printed out in order. For us, it would be quite cumbersome to do this, so we will just add a timestamp to the table creation.

SQLite queries the schema tables to implement this, so that tables
can be printed out in order. For us, it would be quite cumbersome
to do this, so we will just add a timestamp to the table creation.
@penberg penberg changed the title implement the table_list pragma Implement the table_list pragma Feb 14, 2025
@@ -353,6 +355,7 @@ fn create_table(
has_rowid,
primary_key_column_names,
columns: cols,
created_at: Instant::now(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not take this path. For starters, this is not deterministic, so you'd anyway need to query io for time. But more importantly, we don't want to extend the sqlite_schema table because it can lead to subtle incompatibilities with SQLite.

If you don't want to run through the hoops to make the ordering right, just drop created_at, let's merge this, and open an issue for fixing the ordering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants