$ the-wire · showcase
supabase-csharp stops leaking across schemas
By RepoJournal · Filed · About Supabase · Composed from the cited sources · methodology
supabase-csharp closes the schema blind spots it opened when WithSchema landed: Realtime now subscribes in the right schema, the cache is keyed per schema, and models can name their own via [Table(Schema = ...)].
fix(postgrest): keep the cache of a table separate per schema supabase/supabase-csharp
A table backed by an IPostgrestCacheProvider keyed its cache on the request URL alone, but the schema travels in the Accept-Profile header, so since WithSchema landed, client.WithSchema("archive").Table<Movie>(cache).Get() could be served rows cached for public.movie. The cache is now kept per schema.
fix(supabase): subscribe to changes in the table's schema supabase/supabase-csharp
client.From<T>().On(...) subscribed to the public topic whatever the table's schema, so tables outside public were sent to the wrong topic and Realtime refused the join. The subscription now targets the schema the requests use, exposed through a new IPostgrestTable<TModel>.Schema property.
feat(postgrest): query a table in the schema its model declares supabase/supabase-csharp
TableAttribute gains a Schema property, so [Table("stock", Schema = "inventory")] makes every request on that table target it and lets tables from several schemas run side by side on one client. It is groundwork for generated types from database.generated_types.typed_queries, and carries no capability annotation.
feat(postgrest): renew a rejected access token from its callback and send the request again supabase/supabase-csharp
When PostgREST returns 401 for an access token that came from a callback, the Postgrest client now asks the callback for a new token and resends the request within the request's own retries, implementing the Renewal section of the Per-Request Access Token capability. The failure path used to surface the 401 to the caller.
fix: don't wipe policy_grants and drop_trigger_grants on a rejected value supabase/supautils
The check hooks for policy_grants and drop_trigger_grants freed the live arrays and parsed the new value into them before validating it, so a bad value left that backend without grants until the next good reload, leaked partial entries in TopMemoryContext, and rejected that role's next valid value. The upstream issue is #213.