Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realtime not working in .Net with custom Schema that includes dotnotation #46

Open
jkears opened this issue Apr 22, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@jkears
Copy link

jkears commented Apr 22, 2024

Bug report

I do not see any events to tables in schema "NextWare.Concierge.ConciergeServices". If I rename to "NextWare_Concierge_ConciergeServices" it seems to fire events from within the publication.

Describe the bug

It seems as if Supabase in general struggles with Schema names that include '.' but these are valid schema names.

To Reproduce

Create a schema that includes '.' separators

Expected behavior

That is works, but it does not.

@jkears jkears added the bug Something isn't working label Apr 22, 2024
@acupofjose
Copy link
Contributor

Very interesting! Provided your configuration is all correct (as outlined here: https://supabase.com/docs/guides/realtime/postgres-changes) and the events don't show in your supabase console either, this would be an upstream bug that would need to be tracked in the supabase/realtime repo!

@jkears
Copy link
Author

jkears commented Apr 22, 2024 via email

@jkears
Copy link
Author

jkears commented Apr 22, 2024 via email

@jkears
Copy link
Author

jkears commented Apr 22, 2024 via email

@acupofjose
Copy link
Contributor

I can confirm that the dot notation does fail to be published/replicated from the supabase editor.

For example:

Given the following:

DROP SCHEMA "parent.child.cousin" CASCADE;
CREATE SCHEMA "parent.child.cousin";

SET search_path TO "parent.child.cousin";

CREATE TABLE outbox (
    MessageId SERIAL PRIMARY KEY,
    MessageBody TEXT NOT NULL,
    Recipient VARCHAR(255) NOT NULL,
    Status VARCHAR(50) NOT NULL,
    RetryCount INTEGER NOT NULL DEFAULT 0,
    NextRetryTimestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CreatedTimestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
    LastUpdatedTimestamp TIMESTAMP WITH TIME ZONE
);

The dashboard produces the error when enabling publications:

Failed to update database publication: failed to update pg.publications with the given ID: relation "parent.child.cousin.outbox" does not exist

However, the following does work:

DROP SCHEMA "parent_child_cousin" CASCADE;
CREATE SCHEMA "parent_child_cousin";

SET search_path TO "parent_child_cousin";

CREATE TABLE outbox (
    MessageId SERIAL PRIMARY KEY,
    MessageBody TEXT NOT NULL,
    Recipient VARCHAR(255) NOT NULL,
    Status VARCHAR(50) NOT NULL,
    RetryCount INTEGER NOT NULL DEFAULT 0,
    NextRetryTimestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CreatedTimestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
    LastUpdatedTimestamp TIMESTAMP WITH TIME ZONE
);

This is not a limitation of the library though, it's a limitation from supabase. If it's something that you'd like addressed, please open an issue on the supabase/realtime repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants