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

Fix first query execution after a LOAD command #48

Merged
merged 1 commit into from
May 26, 2024

Conversation

rjuju
Copy link
Collaborator

@rjuju rjuju commented May 26, 2024

If the extension is loaded with a plain LOAD command, the search_path will only be set during the next query execution. It means that the very first query executed after such a LOAD wouldn't see the global temporary tables.

If the extension is loaded with a plain LOAD command, the search_path will only
be set during the next query execution.  It means that the very first query
executed after such a LOAD wouldn't see the global temporary tables.
@rjuju
Copy link
Collaborator Author

rjuju commented May 26, 2024

I found a corner case issue when trying some scenarios around issue #40.

Basically, doing:

LOAD 'pgtt';
SELECT * FROM some_global_temp_table;

would fail, as the search_path would be overloaded in the post_parse_analyze_hook of the SELECT query, which is never reached as it fails during the parse analysis, complaining about the global temp table not being found.

@darold darold merged commit f84fa01 into darold:master May 26, 2024
5 checks passed
@rjuju rjuju deleted the fix_load branch May 31, 2024 06:50
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