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

Inserting a nil into a text column results in 'false' (PostgreSQL) #38

Open
andrei-dubovik opened this issue May 6, 2017 · 2 comments

Comments

@andrei-dubovik
Copy link

E.g.,
(dbi:do-sql dbh "CREATE TABLE example (name text)")
(dbi:execute (dbi:prepare dbh "INSERT INTO example (name) VALUES (?)") nil)
yields a text string 'false' in the name column. So, is it intended behaviour?

@andrei-dubovik
Copy link
Author

Yes, I suppose it is intended behaviour. I've just found out it's coming from cl-postgres:to-sql-string (see https://github.com/marijnh/Postmodern/blob/master/cl-postgres/sql-string.lisp). Keyword :null does the trick. Is it the same behaviour in mysql and other drivers?

@fukamachi
Copy link
Owner

Thank you for reporting.
Though CL-DBI should abstract the conversion data between DB and CL, it still remains to do in the future.

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

2 participants