-
Notifications
You must be signed in to change notification settings - Fork 129
Redesign extension installation logic #801
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added minor nits and looks like the test are sad ;-)
SET search_path = pg_catalog, pg_temp | ||
SET duckdb.force_execution = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it is the case - but will that be automatically reset after execution of the function?
sql/pg_duckdb--0.3.0--1.0.0.sql
Outdated
-- TODO: Maybe rename/replace "enabled" column of extensions with autoload or | ||
-- something similar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we're never gonna see this TODO after 1.0 ships :-) Maybe we should move it to where the column is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this was more meant as a "review todo". So it served it's purpose by starting this discussion ;) I think autoload makes more sense as a name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah autoload makes sense indeed.
src/pgduckdb_guc.cpp
Outdated
@@ -119,7 +119,7 @@ char *duckdb_postgres_role = strdup(""); | |||
|
|||
int duckdb_maximum_threads = -1; | |||
char *duckdb_maximum_memory = strdup("4GB"); | |||
char *duckdb_disabled_filesystems = strdup("LocalFileSystem"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we want that by default anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this change to a follow up PR
src/pgduckdb_options.cpp
Outdated
if (ret != SPI_OK_INSERT) | ||
elog(ERROR, "SPI_exec failed: error code %s", SPI_result_code_string(ret)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (ret != SPI_OK_INSERT) | |
elog(ERROR, "SPI_exec failed: error code %s", SPI_result_code_string(ret)); | |
if (ret != SPI_OK_INSERT) { | |
elog(ERROR, "SPI_exec failed: error code %s", SPI_result_code_string(ret)); | |
} |
also - shouldn't we uninstall the extension? (to maintain a consistent state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uninstalling seems unwanted, we don't know if it was already there through other means. Also this is really never supposed to throw an error.
f8117ed
to
dad6e05
Compare
dad6e05
to
5d86474
Compare
e5a63ae
to
c6c6a89
Compare
c6c6a89
to
533f820
Compare
This PR starts auto-installing missing extensions if both of the following are true:
duckdb.autoinstall_known_extensions
is set totrue
duckdb.extensions
table.Fixes #686
Fixes #687