Skip to content

Set search path #6

Open
Open

Description

@duncandewhurst

How can I set the search path for a session?

Ideally, I would like to be able to change the search path after the session is initiated.

I tried using the following command, but subsequent queries don't seem to use the schema:

%%nql

SET search_path = {{schema_name}}, public

Activity

  1. kindly commented on Jun 2, 2021

    @kindly
    Contributor

    You would need todo as it will try and treat schama name as a paremeter. So you need so say it is raw sql like:

    %%nql
    
    SET search_path = {{schema_name | sql}}, public
    
  2. kindly commented on Jun 2, 2021

    @kindly
    Contributor

    Also you can do session.schema = 'schema_name, public' to the session to change the schema for all following queries.

  3. duncandewhurst commented on Jun 3, 2021

    @duncandewhurst
    ContributorAuthor

    Also you can do session.schema = 'schema_name, public' to the session to change the schema for all following queries.

    Great, that would be good to add to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions