Tried running it and get this:
"ERROR: function _st_summarystats(raster, integer, boolean, integer) is
not unique
LINE 3: AS $$ SELECT _st_summarystats($1, 1::int, $2, 1) $$
^
HINT: Could not choose best candidate function. You might need to add
explicit type casts"
-Steve
On 2/22/2012 1:59 PM, Bborie Park wrote:
Interesting. Can you run the following and try again?
CREATE OR REPLACE FUNCTION st_summarystats(rast raster,
exclude_nodata_value boolean)
RETURNS summarystats
AS $$ SELECT _st_summarystats($1, 1::int, $2, 1) $$
LANGUAGE 'SQL' IMMUTABLE STRICT;
If that removes the HINT, I'll make the appropriate changes to the code.
-bborie
On 02/22/2012 10:48 AM, Stephen Crawford wrote:
I only tried the casting because of the messages I get, on of which is:
"function _st_summarystats($1, 1, $2, 1) is not unique"
and
"HINT: Could not choose best candidate function. You might need to add
explicit type casts"
Thanks,
steve
On 2/22/2012 1:41 PM, Bborie Park wrote:
Hey Steve,
_st_summarystats is an underlying function that isn't meant for use by
end-users. ST_SummaryStats is what you should be using.
The example query you provided shouldn't have any issues and shouldn't
be creating any of those messages. In your situation, you don't even
need the true::boolean.
-bborie
On 02/22/2012 10:34 AM, Stephen Crawford wrote:
Should I have both _st_summarystats and st_summarystats in my
database?
I get messages like "function not unique" and "could not choose best
candidate function" when doing this:
SELECT rid, observation_date, ST_SummaryStats(rast::raster,
true::boolean) FROM spring_ms WHERE observation_date = '2012-02-20';
I expected to get 187 records (one for each tile).
Thanks,
Steve
--
Stephen Crawford
Center for Environmental Informatics
The Pennsylvania State University
src...@psu.edu
814.865.9905
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users