Bug report
Describe the bug
Error after upgrading to 2.33.1 I'm getting this Typescript error: SelectQueryError<"Referencing missing column 'computed_review_score'">
computed_review_score is a function:
CREATE FUNCTION computed_review_score(event event_ticketing.events) RETURNS numeric
LANGUAGE sql AS
$$
SELECT COALESCE(event.review_score,
(SELECT ROUND(AVG((VALUE ->> 'score')::NUMERIC), 1) FROM JSONB_ARRAY_ELEMENTS(event.reviews)));
$$;
And this is the query:
supabaseClient
.rpc('search_events', payload)
.select(
'*, computed_review_score'
)
Also it is strange that the generated type for this function has unknown for the argument, it should be the table type:
...
Functions: {
computed_review_score: {
Args: {
event: unknown
}
Returns: number
}
}
...
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Go to '…'
- Click on '…'
- Scroll down to '…'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: [e.g. macOS, Windows]
- Browser (if applies) [e.g. chrome, safari]
- Version of supabase-js: [e.g. 6.0.2]
- Version of Node.js: [e.g. 10.10.0]
Additional context
Add any other context about the problem here.
Bug report
Describe the bug
Error after upgrading to 2.33.1 I'm getting this Typescript error:
SelectQueryError<"Referencing missing column 'computed_review_score'">computed_review_scoreis a function:And this is the query:
Also it is strange that the generated type for this function has unknown for the argument, it should be the table type:
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.