<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think that “pass in a SQL” string, or “table name” are the roads to hackyland. You’re building a database: take in and emit primitive values/objects or tuples or tuplesets. You build primitives and let other folks build the SQL stuff on top.<div class=""><br class=""></div><div class="">P.<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 18, 2016, at 8:24 AM, Björn Harrtell <<a href="mailto:bjorn.harrtell@gmail.com" class="">bjorn.harrtell@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">2016-09-18 7:48 GMT+02:00 Sandro Santilli<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:strk@kbt.io" target="_blank" class="">strk@kbt.io</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On Sat, Sep 17, 2016 at 05:47:39PM -0700, Paul Norman wrote:<br class="">> On 9/17/2016 8:09 AM, Sandro Santilli wrote:<br class=""><br class=""></span><span class="">> >Using a row-by-row approach, makes it impossible to build such<br class="">> >dictionary, which is why my early attemps were just at producing<br class="">> >the geometric part, very much like the GML output works, delegating<br class="">> >composition of the whole final product to the caller (which could<br class="">> >eventually also be a ROW-taking wrapper).<br class="">><br class="">> You're right. Joining different layers is fine, but each layer has<br class="">> some common information that is needed.<br class="">><br class="">> Should it be an aggregate function then?<br class=""><br class=""></span>Probably, which means you'd also need to define a type<br class="">to represent the state (including the dictionary, for example).<br class="">It's enough stuff that might be better to move into its own<br class="">extension.<br class=""></blockquote><div class=""><br class=""></div><div class="">What do you think about the alternative of simply supplying the function with a name of a table or view assuming the the proposed structure then dynamically query it internally using the supplied bounds?</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="">--strk;<br class=""><div class="HOEnZb"><div class="h5">______________________________<wbr class="">_________________<br class="">postgis-devel mailing list<br class=""><a href="mailto:postgis-devel@lists.osgeo.org" class="">postgis-devel@lists.osgeo.org</a><br class=""><a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank" class="">http://lists.osgeo.org/<wbr class="">mailman/listinfo/postgis-devel</a></div></div></blockquote></div><br class=""></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">postgis-devel mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:postgis-devel@lists.osgeo.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">postgis-devel@lists.osgeo.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.osgeo.org/mailman/listinfo/postgis-devel</a></div></blockquote></div><br class=""></div></div></body></html>