Skip to content

Conversation

Mytherin
Copy link
Collaborator

Fixes #13769

This PR reworks the way that the search path is used during binding. Previously, we would always use the clients' global search path to bind. This PR reworks that so that when binding a view, we expand the search path using the catalog/schema in which the view is located.

This allows us to query views that depend on other elements within the same catalog (e.g. tables or other views), without having to modify the clients' global search path (using e.g. the USE statement). This is particularly helpful when attaching databases that contain views.

Copy link
Contributor

@Tishj Tishj left a comment

Choose a reason for hiding this comment

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

Cool, love to see the retriever being useful for more things 👍

@Mytherin Mytherin merged commit c86c290 into duckdb:feature Sep 13, 2024
39 checks passed
@Mytherin Mytherin deleted the bindviewssearchpath branch December 8, 2024 06:53
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