supabase / walrus

Applying RLS to PostgreSQL WAL
Apache License 2.0
119 stars 9 forks source link

Error when column type is quoted custom enum #31

Closed w3b6x9 closed 2 years ago

w3b6x9 commented 2 years ago

Describe the bug

I cannot listen to a table that has a column of type custom enum with double quotes.

To Reproduce

Steps to reproduce the behavior:

  1. CREATE TYPE "MOOD" AS ENUM ('sad', 'ok', 'happy');
  2. create table test (
    id bigint primary key,
    mood "MOOD"
    );
  3. Insert a row
  4. Poll for changes

Expected behavior

I get back database changes without error.

Actual behavior

ERROR:  invalid input syntax for type json
DETAIL:  Token "MOOD" is invalid.
CONTEXT:  JSON data, line 1: ...:"bigint","value":1},{"name":"mood","type":""MOOD...

Additional context

wal2json issue: https://github.com/eulerto/wal2json/issues/224

olirice commented 2 years ago

Resolvable by upgrading to wal2json 2.4

w3b6x9 commented 2 years ago

@olirice gonna keep this open until we upgrade all projects to wal2json 2.4

olirice commented 2 years ago

closing b/c up was completed (tracking the regression in a new issue #40 )