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

Issue with where clause when NULL values exist in the data #31

Open
mitso32 opened this issue Jan 16, 2020 · 2 comments
Open

Issue with where clause when NULL values exist in the data #31

mitso32 opened this issue Jan 16, 2020 · 2 comments

Comments

@mitso32
Copy link

mitso32 commented Jan 16, 2020

Hello,

Thank you for the work on the decoder raw plugin! We were performing tests with the decoder_raw plugin and encountered an issue with tables that have NULL values in some of the fields.

In our testing, we had a number of tables that were set to REPLICA IDENTITY FULL, since they lacked a primary key.

In the SQL that was generated by the plugin the UPDATE statement would have the UPDATE where clause with the following format:

WHERE lastname = NULL ...

With most SQL standards the '= ' sign should be replaced with the word 'is' for the NULL value.
This would also impact DELETE statements.

The decoder_raw.c file was the file that I reviewed for the WHERE clause function.

Thank you,

@michaelpq
Copy link
Owner

Would you like to write a patch for it?

@sergeykono
Copy link

I faced the same issue.

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

No branches or pull requests

3 participants