[postgis-devel] [postgis-tickets] r15406 - Fix topology PostgreSQL 10 regress errors

Regina Obe lr at pcorp.us
Sat May 27 10:14:28 PDT 2017


Okay I changed those to spaces and ticketed the overall issue and assigned
to you. 

https://trac.osgeo.org/postgis/ticket/3767

I don't think we are consistent with sql files.


-----Original Message-----
From: strk at kbt.io [mailto:strk at kbt.io] 
Sent: Saturday, May 27, 2017 4:50 AM
To: Regina Obe <lr at pcorp.us>
Cc: postgis-devel at lists.osgeo.org
Subject: Re: [postgis-tickets] r15406 - Fix topology PostgreSQL 10 regress
errors

On Fri, May 26, 2017 at 12:35:19PM -0700, Regina Obe wrote:
> Author: robe
> Date: 2017-05-26 12:35:19 -0700 (Fri, 26 May 2017) New Revision: 15406
...

> -    FOR rec2 IN SELECT CASE
> -       WHEN rec.dims = 0 THEN
> +  	-- NOTE: storing this as a constant 
> +  	-- because the CASE WHEN in PostgreSQL 10 refuses to short-circuit 
> +  	-- when CASE contains set returning functions and the CASE boolean
is not a constant
> +  	-- TODO: this feels a little dirty to assume so may need a revisit
in near future
> +  	var_dims = rec.dims;
> +    FOR rec2 IN SELECT CASE var_dims

Regina, the indentation for this file is wrong.
If you're finally using git (the mirroring scripts should allow you to setup
such a workflow) you can see the issues introduced using:

  git show --check 0d939f5c54eb14313952d7f9db6e8cb4fd09c4a8

Which tells you (with colors, that you won't see here):

  topology/sql/topogeometry/totopogeom.sql.in:243: trailing whitespace,
space before tab in indent.
  +       -- NOTE: storing this as a constant
  topology/sql/topogeometry/totopogeom.sql.in:244: trailing whitespace,
space before tab in indent.
  +       -- because the CASE WHEN in PostgreSQL 10 refuses to short-circuit
  topology/sql/topogeometry/totopogeom.sql.in:245: space before tab in
indent.
  +       -- when CASE contains set returning functions and the CASE boolean
is not a constant
  topology/sql/topogeometry/totopogeom.sql.in:246: space before tab in
indent.
  +       -- TODO: this feels a little dirty to assume so may need a revisit
in near future
  topology/sql/topogeometry/totopogeom.sql.in:247: space before tab in
indent.
  +       var_dims = rec.dims;

That file uses spaces for tabs, btw. I see editorconfig doesn't mention what
kind of tabs should be used for SQL files so this is not something currently
easy to deal with (maybe this could be ticketed, to get some help from
editorconfig).

--strk;




More information about the postgis-devel mailing list