Re: [postgis-tickets] r15439 - Clean up of formatting of r15406.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [postgis-tickets] r15439 - Clean up of formatting of r15406.

Sandro Santilli-3
On Tue, Jun 20, 2017 at 04:29:37PM -0700, Regina Obe wrote:

> --- trunk/topology/sql/topogeometry/totopogeom.sql.in 2017-06-20 22:16:18 UTC (rev 15438)
> +++ trunk/topology/sql/topogeometry/totopogeom.sql.in 2017-06-20 23:29:37 UTC (rev 15439)
> @@ -236,16 +236,24 @@
>    -- definition by splitting
>    FOR rec IN SELECT id(tg), alayer as lyr,
>      geom, ST_Dimension(geom) as dims
> -    FROM (SELECT (ST_Dump(ageom)).geom) as f
> +    FROM (SELECT gd.geom FROM ST_Dump(ageom) AS gd ) as f

How about this simplification:

       FROM ST_Dump(ageom)

--strk;

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [postgis-tickets] r15439 - Clean up of formatting of r15406.

Regina Obe-2
Done -   I put in an alias though.  
I like aliases so I don't have to figure out where the geom came from or get
bitten when someone introduces another variable somewhere called geom.

@@ -236,7 +236,7 @@
   -- definition by splitting
   FOR rec IN SELECT id(tg), alayer as lyr,
-    geom, ST_Dimension(geom) as dims
-    FROM (SELECT gd.geom FROM ST_Dump(ageom) AS gd ) as f
-    WHERE NOT ST_IsEmpty(geom)
+    geom, ST_Dimension(gd.geom) as dims
+    FROM ST_Dump(ageom) AS gd
+    WHERE NOT ST_IsEmpty(gd.geom)
   LOOP

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, June 21, 2017 6:15 AM
To: Regina Obe <[hidden email]>
Cc: [hidden email]
Subject: Re: [postgis-tickets] r15439 - Clean up of formatting of r15406.

On Tue, Jun 20, 2017 at 04:29:37PM -0700, Regina Obe wrote:

> --- trunk/topology/sql/topogeometry/totopogeom.sql.in 2017-06-20 22:16:18
UTC (rev 15438)
> +++ trunk/topology/sql/topogeometry/totopogeom.sql.in 2017-06-20 23:29:37
UTC (rev 15439)
> @@ -236,16 +236,24 @@
>    -- definition by splitting
>    FOR rec IN SELECT id(tg), alayer as lyr,
>      geom, ST_Dimension(geom) as dims
> -    FROM (SELECT (ST_Dump(ageom)).geom) as f
> +    FROM (SELECT gd.geom FROM ST_Dump(ageom) AS gd ) as f

How about this simplification:

       FROM ST_Dump(ageom)

--strk;

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [postgis-tickets] r15439 - Clean up of formatting of r15406.

Sandro Santilli-3
On Wed, Jun 21, 2017 at 07:29:42AM -0400, Regina Obe wrote:
> Done -   I put in an alias though.  

Makes sense, thanks !

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Loading...