Skip to content

treat main as the default schema #291

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

Merged
merged 1 commit into from
Jun 15, 2022
Merged

treat main as the default schema #291

merged 1 commit into from
Jun 15, 2022

Conversation

mbostock
Copy link
Member

Per https://sqlite.org/lang_attach.html

The schema-names 'main' and 'temp' refer to the main database and the database used for temporary tables. The main and temp databases cannot be attached or detached. … If the name of the table is unique across all attached databases and the main and temp databases, then the schema-name prefix is not required. If two or more tables in different databases have the same name and the schema-name prefix is not used on a table reference, then the table chosen is the one in the database that was least recently attached.

@mbostock mbostock requested a review from annie June 14, 2022 18:07
Copy link
Contributor

@annie annie left a comment

Choose a reason for hiding this comment

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

ooh NULLIF is nice

@mbostock mbostock merged commit 055a1f2 into main Jun 15, 2022
@mbostock mbostock deleted the mbostock/sqlite-main branch June 15, 2022 02:58
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