PostgreSQL database operations

by NullQuery
Use a PostgreSQL database backend for your world
ID:1984338
 
Resolved
BYOND Version:509.1314
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 46.0.2490.86
Applies to:pgsql4dm
Status: Resolved

This issue has been resolved.
Descriptive Problem Summary:
If you insert fields into the database which contain null values, then the fields aren't inserted as NULLs but are instead inserted as empty strings (''). This is undesirable.

Numbered Steps to Reproduce Problem:
Perform an INSERT INTO query on a table with fields that accept NULL values.
Sending "null" (without quotes) through BYOND still results in an empty string in the database instead of the expected NULL value.

Expected Results:
If "null" is provided through DM then it should translate to NULL in the database.

Actual Results:
"null" is sent as an empty string instead.

Does the problem occur:
Every time? Or how often?
Every time.
In other games?
Yes.
In other user accounts?
Yes.
On other computers?
Yes.

When does the problem NOT occur?
The problem always occurs.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Since Version 1.0 of the pgsql4dm library, since 509.1313 of BYOND.

Workarounds:
A workaround is to check if the value is null yourself and then modify your query to insert the NULL value directly.
NullQuery changed status to 'Verified'
NullQuery resolved issue