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

How to UPDATE table SET column = NULL with the NULL as parameter? #25

Open
gnusupport opened this issue Jun 26, 2022 · 1 comment
Open

Comments

@gnusupport
Copy link

I would like to provide parameter NULL to:

UPDATE table SET column = $1

And currently providing "NULL" as string does not work. Is there any existing solution?

@gnusupport
Copy link
Author

	(rcd-sql "INSERT INTO businesses (businesses_company, businesses_name, businesses_description,
                                          businesses_url, businesses_tag1, businesses_tag2, businesses_tag3)
                  VALUES ($1, $2, $3, $4, $5, $6, $7)"
		 cf-db company name description url tag-1 tag-2 tag-3)

If tag-1 above is nil then it would b good for emacs-libpq to understand nil as NULL as there is now way to provide NULL as parameter. It means I have to use format before providing SQL to module.

IMHO it is better providing parameters to module rather than using format.

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

1 participant