Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#5678 closed defect (fixed)

WARNING: nonstandard use of escape in a string literal

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 3.3.6
Component: topology Version: master
Keywords: Cc:

Description

Found in the wild:

psql:/woodpecker/src/git.osgeo.org/gitea/postgis/postgis/build/pg12/regress/00-regress-install/share/contrib/postgis/topology.sql:720: WARNING:  nonstandard use of escape in a string literal
LINE 12:       '\.topology_id = (\d+).*\.layer_id = (\d+).*\.type = (...
               ^
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.

Better fix before we miss. Maybe we should have run_test.pl bail out in case of WARNING during spatial database creation ?

Change History (10)

comment:1 by strk, 9 months ago

https://git.osgeo.org/gitea/postgis/postgis/pulls/174 is for the run_test.pl verification of WARNING free preparation/upgrade

comment:2 by strk, 9 months ago

Where the WARNING was seen is here: PG12: https://woodie.osgeo.org/repos/30/pipeline/1822/9#L1048 PG15: https://woodie.osgeo.org/repos/30/pipeline/1822/10#L1048

Both with standard_conforming_strings off and escape_string_warning on

comment:3 by Sandro Santilli <strk@…>, 9 months ago

In 553258b5/git:

SET escape_string_warning to on when setting conforming strings off

References #5678

comment:4 by strk, 9 months ago

The warning is in the populate_topology_layer function, which is also broken at the moment, see #5680

comment:5 by strk, 9 months ago

This was a left-over from #5633 work

comment:6 by strk, 9 months ago

Milestone: PostGIS 3.5.0PostGIS 3.3.6

Setting milestone to 3.3.6 as we didn't fix other standard_conforming_string related problem in 3.2 or earlier

comment:7 by Sandro Santilli <strk@…>, 9 months ago

In f64b082/git:

Fix populate_topology_layer with conforming strings off

References #5680, #5678 in master branch (3.5.0dev)

Includes test

comment:8 by Sandro Santilli <strk@…>, 9 months ago

In c3093e5/git:

Fix populate_topology_layer with conforming strings off

References #5680, #5678 in 3.4 branch (3.4.3dev)

Includes test

comment:9 by Sandro Santilli <strk@…>, 9 months ago

Resolution: fixed
Status: newclosed

In 71afa3e/git:

Fix populate_topology_layer with conforming strings off

Closes #5680, #5678 in 3.3 branch (3.3.7dev)

Includes test

comment:10 by Sandro Santilli <strk@…>, 9 months ago

In 3401974/git:

Have run_test.pl bail out on WARNINGS during script-based db preparation

References #5678
References #5679

Note: See TracTickets for help on using tickets.