2014-11-13 Kyotaro Horiguchi * pg_dbms_stats.c: Fixed a bug that locked statistics won't be effective when accessing tables without select privilege via views. On the current implement, when planner requested the statistics for a column, pg_dbms_stats takes it from the dummy statistics tables via views which gives stats only of columns that the current user can SELECT. Under that way it works, pg_dbms_stats cannot read the dummy statistics of objects invisible from the current user so accessing such objects via views will done using system statistics, even if their statistics are locked. In order to resolve the problem, privileges for the dummy stats tables and the user under which pg_dbms_stats accesses them are changed. 2014-11-06 Kyotaro Horiguchi * pg_dbms_stats.control: Correct default_version. 2014-09-16 Kyotaro Horiguchi * pg_dbms_stats.c: Fix a bug that inheritance state was wrongly handled. This was resulted in a failure of statistics locking for inheritance parents. 2014-08-25 Kyotaro Horiguchi * pg_dbms_stats.c: Fixed a bug that relation ids which are the keys for the relation statistics cache was mistakenly treated as strings. This causes a false match between oids having a intermediate 0x00 byte and identical lower bytes (for the little endian case). Returning the wrong statistics cache can result in server crash, or at least unexpected plans. * pg_dbms_stats-1.3.3.sql: Lock granularity for pg_dbms_stats's operations was raised. Simultaneous lock operations on different tables no longer block each other. 2014-06-06 Kyotaro Horiguchi * pg_dbms_stats.c: pg_dbms_stats no more causes planner to access repeatedly to the tables of pg_dbms_stats for nonexistent saved statistics during considering access paths involving tables or indexes that don't have their statistics 'lock'ed. This change improves the performance especially for light weight (which means taking less than a few milliseconds) queries on no-locked tables/indexes. * pg_dbms_stats.c: Fix a bug potentially causes SEGV crash. * pg_dbms_stats--*.sql, pg_dbms_stats.control: Now declares the right version to the extension framework. ALTER EXTENSION can be used to upgrade from the older versions. 2013-11-07 Kyotaro Horiguchi * Fixed a bug potentially cause SEGV after changing column data types on 'lock'ed tables * Added clean_up_stats() function, which erases all saved statistics left alone after deleting tables before unlocking statistics. 2013-11-07 Kyotaro Horiguchi * First published version.