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

Supabase realtime 'postgres changes' fetching number value instead of bigint value #1270

Open
2 tasks done
18vijayb opened this issue Sep 12, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@18vijayb
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When supabase postgres changes send messages, the bigint id column is being converted to a number

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Set up bigint above max_value for a column value in supabase db
  2. Enable anon RLS to access the rows
  3. Subscribe to the postgres db channel in javascript according to the tutorial
  supabase
    .channel("schema-db-changes")
    .on(
      "postgres_changes",
      {
        event: "*",
        schema: "public",
      },
      (payload: RealtimePostgresChangesPayload<RealtimePost>) => {
        console.log(payload);
        if (Object.keys(payload.new).length !== 0) {
          console.log(payload.new);
        }
      }
    )
    .subscribe();

Expected behavior

The realtime value for the bigint/int8 column shouldn't be number. I also listened to schema-db-changes in supabase realtime and found the same behavior

Screenshots

image

image

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

@18vijayb 18vijayb added the bug Something isn't working label Sep 12, 2024
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

1 participant