Re: [HACKERS] PRIVATE columns

2012-12-13 Thread Kohei KaiGai
2012/12/12 Tom Lane : > Simon Riggs writes: >> Currently, ANALYZE collects data on all columns and stores these >> samples in pg_statistic where they can be seen via the view pg_stats. > > Only if you have appropriate privileges. > >> In some cases we have data that is private and we do not wish o

Re: [HACKERS] PRIVATE columns

2012-12-13 Thread Simon Riggs
On 12 December 2012 20:57, Tom Lane wrote: > SET STATISTICS 0 seems like a sufficient solution for people who don't > trust the have_column_privilege() protection in the pg_stats view. The point here is that a user may *have* privilege on the column and have rights to see some, but not all, rows

Re: [HACKERS] PRIVATE columns

2012-12-12 Thread Jan Wieck
On 12/12/2012 3:12 PM, Simon Riggs wrote: On 12 December 2012 19:13, Jan Wieck wrote: On 12/12/2012 1:12 PM, Simon Riggs wrote: Currently, ANALYZE collects data on all columns and stores these samples in pg_statistic where they can be seen via the view pg_stats. In some cases we have data th

Re: [HACKERS] PRIVATE columns

2012-12-12 Thread Tom Lane
Simon Riggs writes: > Currently, ANALYZE collects data on all columns and stores these > samples in pg_statistic where they can be seen via the view pg_stats. Only if you have appropriate privileges. > In some cases we have data that is private and we do not wish others > to see it, such as pati

Re: [HACKERS] PRIVATE columns

2012-12-12 Thread Joshua D. Drake
On 12/12/2012 12:12 PM, Simon Riggs wrote: Would protecting it the same way, we protect the passwords in pg_authid, be sufficient? The user backend does need to be able to access the stats data during optimization. It's hard to have data accessible and yet impose limits on the uses to which t

Re: [HACKERS] PRIVATE columns

2012-12-12 Thread Simon Riggs
On 12 December 2012 19:13, Jan Wieck wrote: > On 12/12/2012 1:12 PM, Simon Riggs wrote: >> >> Currently, ANALYZE collects data on all columns and stores these >> samples in pg_statistic where they can be seen via the view pg_stats. >> >> In some cases we have data that is private and we do not wis

Re: [HACKERS] PRIVATE columns

2012-12-12 Thread Jan Wieck
On 12/12/2012 1:12 PM, Simon Riggs wrote: Currently, ANALYZE collects data on all columns and stores these samples in pg_statistic where they can be seen via the view pg_stats. In some cases we have data that is private and we do not wish others to see it, such as patient names. This becomes mor

[HACKERS] PRIVATE columns

2012-12-12 Thread Simon Riggs
Currently, ANALYZE collects data on all columns and stores these samples in pg_statistic where they can be seen via the view pg_stats. In some cases we have data that is private and we do not wish others to see it, such as patient names. This becomes more important when we have row security. Perh