You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
@@ -287,3 +287,36 @@ type Schema = Database['public']
287
287
|SelectQueryError<'Could not choose the best candidate function between: polymorphic_function_with_unnamed_default_overload( => int4), polymorphic_function_with_unnamed_default_overload(). Try renaming the parameters or the function itself in the database so function overloading can be resolved'>
'function returning set of rows': postgrest.rpc('function_returning_set_of_rows'),
217
228
}asconst
218
229
219
230
describe('rpc',()=>{
@@ -920,4 +931,97 @@ describe('rpc', () => {
920
931
}
921
932
`)
922
933
})
934
+
935
+
test('function with blurb_message',async()=>{
936
+
constres=awaitrpcQueries['function with blurb_message']
937
+
expect(res).toMatchInlineSnapshot(`
938
+
Object {
939
+
"count": null,
940
+
"data": null,
941
+
"error": Object {
942
+
"code": "PGRST202",
943
+
"details": "Searched for the function public.blurb_messages with parameters channel_id, data, id, message, username or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.",
944
+
"hint": "Perhaps you meant to call the function public.get_messages",
945
+
"message": "Could not find the function public.blurb_messages(channel_id, data, id, message, username) in the schema cache",
Copy file name to clipboardExpand all lines: test/db/00-schema.sql
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -307,3 +307,24 @@ create or replace function public.polymorphic_function_with_unnamed_default_over
307
307
create or replacefunctionpublic.polymorphic_function_with_unnamed_default_overload(text default 'default') returns text language sql as $$ SELECT'foo' $$;
308
308
create or replacefunctionpublic.polymorphic_function_with_unnamed_default_overload(bool default true) returns int language sql as'SELECT 3';
309
309
310
+
createfunctionpublic.blurb_message(public.messages) returns character varying as
311
+
$$
312
+
selectsubstring($1.message, 1, 3);
313
+
$$ language sql stable;
314
+
315
+
316
+
create or replacefunctionpublic.function_returning_row()
317
+
returns public.users
318
+
language sql
319
+
stable
320
+
as $$
321
+
select*frompublic.userslimit1;
322
+
$$;
323
+
324
+
create or replacefunctionpublic.function_returning_set_of_rows()
0 commit comments