windmill
windmill copied to clipboard
bug: Can't assign NULL to variables in Postges script
Describe the bug
When creating a PostgreSQL script in Windmill, one can customize query variables in the following way:
-- $1 name1 = default arg
-- $2 name2
INSERT INTO demo VALUES ($1::TEXT, $2::INT) RETURNING *
However, nowhere in the documentation does it say anything about NULL values or non-required fields (the AI also doesn't know). I tried using NULL, null, None, and other variations thereof, but all of them are interpreted as strings. In effect, one can't have a non-required field without a non-NULL default value.
I consider this a bug because it's basic database functionality.
To reproduce
- Go to
Create a script - Select Postgres
- Enter query
- Define variables
- Assign value "NULL", "null", "None" or something similar to one of a value, with or without quotes.
- See that it's interpreted as a string.
Expected behavior
There should be a clear and documented way to assign NULL values to variables
Screenshots
No response
Browser information
No response
Application version
No response
Additional Context
No response
On a related note, assigning False to a boolean variable doesn't work - it shows as True (Enabled) in the UI.