Guys Im sorry but realy I need help with Schema Ca...
# help
t
Guys Im sorry but realy I need help with Schema Cache, is making me crazy, I have a function named : "channels_admin" I see this function everywhere, if I run it from sql editor on supabase or pgadmin work at 100% when I call it by supabasejs I get error of schema cache but isn't possible because I pruned the entire docker settings, images, containers, volumes and then I builded again from 0
s
idToExclude
is listed as
TEXT
type in your function, but
{}
represents an array in Postgres. I'm not sure if it's the same problem, but I experienced something similar with passing arrays as args to functions - solution at https://discord.com/channels/839993398554656828/927603431223484457/927604877901836348
g
I usually run into this type of error when I have changed the parameters (or order of them) in a function and did not delete the old function. You basically end up with multiple functions. The sql window knows how to find the right function, but postgrest rpc does not deal with it cleanly. Not sure though as you say you started from scratch... here was one discussion on it https://github.com/supabase/supabase/discussions/4172
t
The issue was the data type
I was parsing text to after cast it into bigint[], when The right way was parse directly the array and skip the cast
Wasn't nothing to see about schema cache
I tried to inspect supabasejs to see why the error get was about the schema but the library is in typescript nested with postrgress builder, no way for me to inspect it and fix in short time, to many deadlines at work 😅
About changes and schema cache I fixed with 2 funtions and triggers to Force the NOTIFY reload schema