<div dir="ltr">Hi,<br><br>how about this?<br><br>select (array_agg(*))::json from ...<br><br>adding geometry-> json default cast using ST_AsGeoJSON would make this possible. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2019 at 11:27 PM Regina Obe <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Oh and if it's a feature collection then it's an Agg.<br>
<br>
<br>
<br>
> -----Original Message-----<br>
> From: Regina Obe [mailto:<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>]<br>
> Sent: Thursday, April 18, 2019 4:25 PM<br>
> To: 'PostGIS Development Discussion' <<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>><br>
> Subject: RE: [postgis-devel] JSON Fn Name<br>
> <br>
> ST_AsGeoJSON but I don't like that either.  It should start with ST_As though<br>
> <br>
> What exactly is this supposed to return?<br>
> <br>
> Shouldn't it be ST_AsFeatureCollection  or you planning to just return a<br>
> literally row with a geo json column, which is useful but not AS useful as a<br>
> Feature Collection<br>
> <br>
> > -----Original Message-----<br>
> > From: postgis-devel [mailto:<a href="mailto:postgis-devel-bounces@lists.osgeo.org" target="_blank">postgis-devel-bounces@lists.osgeo.org</a>] On<br>
> > Behalf Of Paul Ramsey<br>
> > Sent: Thursday, April 18, 2019 3:06 PM<br>
> > To: PostGIS Development Discussion <<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>><br>
> > Subject: [postgis-devel] JSON Fn Name<br>
> ><br>
> > Quick temperature-of-the-room<br>
> ><br>
> > ST_AsGeoJSON(record)<br>
> ><br>
> > or<br>
> ><br>
> > row_to_geojson(record)<br>
> ><br>
> > The latter apes the existing pgsql json pattern row_to_json(). The<br>
> > former apes our old patterns.<br>
> > I guess there's always that old open source standby: both.<br>
> ><br>
> > Thoughts?<br>
> ><br>
> > P<br>
> > _______________________________________________<br>
> > postgis-devel mailing list<br>
> > <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
> > <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div>Darafei Praliaskouski</div><div>Support me: <a href="http://patreon.com/komzpa" target="_blank">http://patreon.com/komzpa</a></div></div></div></div>