<div dir="ltr">OK cool.  So if I understand correctly, it seems that there may be no immediate danger to the use of bytea, at the very least it is requiring an implicit cast which may decrease performance.<div><br></div><div>Thanks for all the insight on this... will be rolling forward with an eye towards migrating to "geometry" type in some future release.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 4:32 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Oct 31, 2014 at 01:49:59PM -0400, Robert Burgholzer wrote:<br>
> Working at the module level in Drupal, creating queries with spatial<br>
> operators for Views.  Basically, Drupal's GeoField module stores geoms as<br>
> "bytea", which the PostGIS functions seem to handle quite nicely without a<br>
> cast.<br>
<br>
</span>The cast is there, only it's implicit.<br>
When you call a function, PostgreSQL looks for candidates.<br>
Example: you call ST_Length(bytea), PostgreSQL finds an<br>
ST_Length(geometry) and see if a cast from geometry to bytea exists<br>
and is tagged as allowed to be implicit, it finds it and calls it.<br>
<br>
You can see this yourself by creating your own ST_Length(bytea) function,<br>
in which case it'll be called instead of ST_Length(geometry).<br>
<br>
In case multiple candidates exist with the same number of implicit casts<br>
required, PostgreSQL will raise an error.<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
<br>
  ()   Free GIS & Flash consultant/developer<br>
  /\   <a href="http://strk.keybit.net/services.html" target="_blank">http://strk.keybit.net/services.html</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--<br>Robert W. Burgholzer<br> 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.'  - Charles Mingus<div>Athletics: <a href="http://athleticalgorithm.wordpress.com/" target="_blank">http://athleticalgorithm.wordpress.com/</a> <br></div><div>Science: <a href="http://robertwb.wordpress.com/" target="_blank">http://robertwb.wordpress.com/</a></div><div>Wine: <a href="http://reesvineyard.wordpress.com/" target="_blank">http://reesvineyard.wordpress.com/</a></div></div></div>
</div>