microsoft / vscode-postgresql

PostgreSQL extension for VSCODE
Other
393 stars 50 forks source link

Zero-length string ('') shows up as NULL in the results pane #26

Open MichaelConrad opened 5 years ago

MichaelConrad commented 5 years ago

Steps to Reproduce:

CREATE TABLE t1 (c1 TEXT,
                 comment TEXT);

INSERT INTO t1 (c1, comment) VALUES (null, 'null value'),
                                    ('', 'zero-length string'),
                                    (' ', 'single-space string');

SELECT * FROM t1;

image

Note that other GUIs properly render this result as a zero-length string:

image

fleetside72 commented 5 years ago

..or more simply SELECT null::text, ''::text