Skip to content

Custom schema usage error #840

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

Closed
andim27 opened this issue Feb 15, 2024 · 1 comment
Closed

Custom schema usage error #840

andim27 opened this issue Feb 15, 2024 · 1 comment
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest

Comments

@andim27
Copy link

andim27 commented Feb 15, 2024

Describe the bug
Try use custom schema which was created from rpc call in dynamic mode
Get an error:
PostgrestException(message: The schema must be one of the following: public, storage, graphql, realtime, code: PGRST106, details: Not Acceptable, hint: null)
I/flutter (11846): #0 PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:283:7)
I/flutter (11846): #1 PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:164:14)
I/flutter (11846):
I/flutter (11846): #2 PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:372:24)
I/flutter (11846):

To Reproduce

  1. init supabase client
  2. call rpc( which create custom schema with name (customSchema) + make all grants(USAGE, PRIVILEGES)
  3. make call: await sbClient.schema(customSchema).from(....)
  4. get error from supabase flutter
@andim27 andim27 added the bug Something isn't working label Feb 15, 2024
@Vinzent03
Copy link
Collaborator

The schema has to be added to postgrest as well. Best to follow the documentation. Though, I think it's generally uncommon to create whole new schema from rpc.

@dshukertjr dshukertjr added the postgrest This issue or pull request is related to postgrest label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest
Projects
None yet
Development

No branches or pull requests

3 participants