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

fix: boolean parsing #48

Merged
merged 2 commits into from
Oct 27, 2024
Merged

Conversation

WcaleNieWolny
Copy link
Contributor

What kind of change does this PR introduce?

Bug fix for boolean value parsing.

What is the current behavior?

I did not create an issue beforehand, so I will describe the current behavior here.
I am running PostgreSQL 17 (PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit).
With the following table:

-- create a table
CREATE TABLE test(
  id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
  name TEXT NOT NULL,
  archived BOOLEAN NOT NULL DEFAULT FALSE
);

-- add test data
INSERT INTO test (name, archived)
  VALUES ('test row 1', true),
  ('test row 2', false);

I created the publication like so:

create publication my_publication for table test;

and later I ran the stdout example.

I ran the following query:

update test set name='test row 1' where id=1;

which resulted in SourceError(CdcStream(CdcEventConversion(InvalidBool(ParseBoolError))))

What is the new behavior?

I changed slightly the boolean parsing so that t and f are parsed correctly.

@imor imor merged commit f3cce3c into supabase:main Oct 27, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants