Skip to content

Client does not use alternative schema when provided #217

@Morioki

Description

@Morioki

Describe the bug
Client does not pass schema to the initialization of the SyncPostgresClient object. This causes any call to the database to assume that the default public database is used instead of the provided schema.

To Reproduce

  1. Create a table in an alternate schema, where a table does not exist with the same name in the public schema.
  2. Create a client object using the create_client() function and provide it an alternative schema in the ClientOptions dict.
  3. Query the table or attempt an insert into the table

Expected behavior
Table is queried / inserted into properly.

Screenshots
image

supabase-py version 0.5.6

Available Workaround
It is possible to currently call the schema function on the postgrest object within the client object in order to properly set the schema.
ex: supabase.postgrest.schema('alternateSchema')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerspostgrestIssues related to postgrest-py

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions