Skip to content

Logging and errors during schema generation #576

Open
@cazzer

Description

@cazzer

Heyyy Supabase fam! Absolutely loving this extension, thanks for supporting it!

TL;DR There are a few explicit limitations for the schema generation and a few undocumented, (though reasonable ones). Would be awesome to see the schema generator's logs to more quickly find the offending issue for a table or function in question.

More details on my instance if you're curious...I was trying to expose a function similar to the following:

create or replace function search_function(
  a integer,
  b integer
)
  returns table (a integer, b integer, sum integer)
  language sql
  immutable
as $function$
  select
    a as a,
    b as b,
    a + b as sum;
$function$;

This function won't be exposed, which baffled me for far too long before I finally realized I super just need to return an id field in the response structure. My actual use case returned three different ID-ish fields, (I was union-ing some tables and pulled each ID back in separate columns) which is why I didn't think to have an additional id column.

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