[postgis-users] typemod on st_union() results
Sandro Santilli
strk at keybit.net
Sun Oct 20 02:21:02 PDT 2013
On Sat, Oct 19, 2013 at 11:15:59PM -0700, maplabs at light42.com wrote:
> Hi All -
>
> I have a process where I split a large number of geometries by a second set of (smaller) geometries, then recombine them using a GROUP BY gid. Both source set and splitter set have the same SRID, and the results, and the combined results, therefore have an SRID.
>
> But in the age of typemod, geometry_columns sees a big zero SRID. ugh Using a cast inline has been suggested, but in this case, the result of the ST_Union() can be either Polygon or Multipolygon. As far as I know, the typemod has to know specifically which one..
>
You can specify "geometry" as the type:
::geometry(geometry, <actual_srid>)
--strk;
More information about the postgis-users
mailing list