https://supabase.com/ logo
Is there a bug with Realtime currently? Cause I re...
# javascript
j
Is there a bug with Realtime currently? Cause I remembered my code was working and now it's not...è
m
This issue is still open, but there is a workaround: https://github.com/supabase/realtime/issues/265
If you believe to be affected, you can run this in the SQL Editor for the project:
Copy code
create or replace function realtime.build_prepared_statement_sql(
    prepared_statement_name text,
    entity regclass,
    columns realtime.wal_column[]
)
    returns text
    language sql
as $$
/*
Builds a sql string that, if executed, creates a prepared statement to
tests retrive a row from *entity* by its primary key columns.
Example
    select realtime.build_prepared_statement_sql('public.notes', '{"id"}'::text[], '{"bigint"}'::text[])
*/
    select
'prepare ' || prepared_statement_name || ' as
    select
        exists(
            select
                1
            from
                ' || entity || '
            where
                ' || string_agg(quote_ident(pkc.name) || '=' || quote_nullable(pkc.value #>> '{}') , ' and ') || '
        )'
    from
        unnest(columns) pkc
    where
        pkc.is_pkey
    group by
        entity
$$;
j
I ran this and it’s sstill not working
Is there anything additional I need to run
m
Can you please open a ticket from the dashboard? I can send it to the realtime team to investigate your case
j
It’s not letting me submit the ticket 😅
I click the button and nothing happens
m
You can also email support@supabase.io. But please also send the project reference in the email.