[postgis-devel] Issue 72 in postgis: ST_Estimated_Extent sometimes returns null if table exists but not in current schema
codesite-noreply at google.com
codesite-noreply at google.com
Mon Nov 24 04:29:32 PST 2008
Comment #2 on issue 72 by robe.... at cityofboston.gov: ST_Estimated_Extent
sometimes returns null if table exists but not in current schema
http://code.google.com/p/postgis/issues/detail?id=72
Mark,
I'm not sure its worth fixing this well at least not for 1.3.4 at any
rate. Just
thought I would mention it since it came up in my testing of verifying the
docs were
accurate. The docs are pretty clear that this version only searches the
current_schema (Not search path).
What I was expecting was for it to throw an error like in the
st_estimated_extent(schema,table,geomname) case when you feed it a schema
that is not
the schema the table resides in rather than just throwing null.
Wouldn't changing the function to
CREATE OR REPLACE FUNCTION st_estimated_extent(text, text)
RETURNS box2d AS
$$
SELECT st_estimated_extent(current_schema(), $1,$2);
$$
LANGUAGE 'sql' IMMUTABLE STRICT SECURITY DEFINER;
Suffice. Then it will correctly throw an error. Otherwise you are left
wandering if
you just don't have any stats rather than you were searching the wrong
schema.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the postgis-devel
mailing list