[postgis-devel] estimated_extent & pg_statistic

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Mon Feb 27 09:37:45 PST 2006


> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
> bounces at postgis.refractions.net] On Behalf Of strk at refractions.net
> Sent: 27 February 2006 16:26
> To: 'PostGIS Development Discussion'
> Subject: Re: [postgis-devel] estimated_extent & pg_statistic

(cut)

> Adding the check makes sense to me, unless there's a special
> postgresql-provided view only showing stats on columns which are
> user-readable, which would be much better.
> 
> --strk;


Hi strk,

As far as I can tell, that is what the PostgreSQL pg_stats view does except:

	1) It only shows the stats which are for postgresql in-built stats
	(1 <= stakind <= 3)

	2) It attempts to interpret the statistics, for example extracting
	correlation and histogram extents from the pg_statistics table.
	Obviously, since our stats format is customized, the result would be
	just nonsense.

Perhaps we should consider adding a new postgis_stats() view to solve the
problem, and then tweak estimate_extent() to use that instead? A \d pg_stats
shows that the has_table_privilege() function should do the job fairly
easily.


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT

T: +44 (0)1752 797131
F: +44 (0)1752 791023

http://www.webbased.co.uk   
http://www.infomapper.com
http://www.swtc.co.uk  

This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other
person.





More information about the postgis-devel mailing list