NULL values in postgis geometry datatype are single tick quoted

16 views
Skip to first unread message

grass

unread,
Jul 25, 2019, 8:40:33 AM7/25/19
to DB Solo
Hi marko,

dbsolo creates datasync-scripts for postgis geometry values with NULL values like this: UPDATE... SET geom = 'NULL' WHERE ....;
The NULL value is erroneously enclosed in single quotes.

Tested with DBsolo 5.4 and latest preview (5.5).

Thanks in advance,
Christian

grass

unread,
Jul 25, 2019, 8:45:17 AM7/25/19
to DB Solo
correction: tested with DBsolo 5.2.4 and latest preview (5.2.5)

DB Solo Admin

unread,
Jul 25, 2019, 5:38:27 PM7/25/19
to DB Solo
Can you post a simple CREATE TABLE + INSERT statements to demonstrate?

marko

grass

unread,
Jul 26, 2019, 10:19:23 AM7/26/19
to DB Solo
Hi marko,

in source database:
CREATE TABLE geomtest (
prj_id varchar(6) NULL,
locid int2 NULL,
geom geometry(POINT, 25832) NULL
);
CREATE UNIQUE INDEX geomtest_prj_id_idx ON geomtest (prj_id,locid);
INSERT INTO tools.geomtest (prj_id,locid,geom) VALUES 
('OUUNP5',1,null);

In destination database:
CREATE TABLE geomtest (
prj_id varchar(6) NULL,
locid int2 NULL,
geom geometry(POINT, 25832) NULL
);
CREATE UNIQUE INDEX geomtest_prj_id_idx ON geomtest (prj_id,locid);
INSERT INTO geomtest (prj_id,locid,geom) VALUES 
('OUUNP5',1,'0101000020E8640000F6285C8F4D592541D7A3707DB4B15541');

Synchronize source table to destination table.

Thanks in advance,
Christian

DB Solo Admin

unread,
Jul 26, 2019, 6:25:37 PM7/26/19
to DB Solo
This should be fixed now, you can find the new version here


marko
Reply all
Reply to author
Forward
0 new messages