Re: [HACKERS] Sloppy thinking about leakproof properties of opclass co-members

2014-09-27 Thread Tom Lane
Dean Rasheed writes: > Rather than (or perhaps as well as) marking all these leakproof, > perhaps we should teach contain_leaky_functions() to automatically > treat any no-arg function as leakproof, so that we allow user-defined > functions too. Taking that one step further, perhaps what it should

Re: [HACKERS] Sloppy thinking about leakproof properties of opclass co-members

2014-09-27 Thread Dean Rasheed
On 26 September 2014 15:48, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Wed, Sep 24, 2014 at 5:34 PM, Tom Lane wrote: >> > ISTM that the most appropriate solution here is to insist that all or none >> > of the members of an operator class be marked leakproof. (Possi

Re: [HACKERS] Sloppy thinking about leakproof properties of opclass co-members

2014-09-26 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Sep 24, 2014 at 5:34 PM, Tom Lane wrote: > > ISTM that the most appropriate solution here is to insist that all or none > > of the members of an operator class be marked leakproof. (Possibly we > > could restrict that to btree opclasses, but

Re: [HACKERS] Sloppy thinking about leakproof properties of opclass co-members

2014-09-25 Thread Robert Haas
On Wed, Sep 24, 2014 at 5:34 PM, Tom Lane wrote: > It strikes me that there's a significant gap in the whole "leakproof > function" business, namely that no consideration has been given to > planner-driven transformations of queries. As an example, if we > have "a = b" and "b = c", the planner ma

[HACKERS] Sloppy thinking about leakproof properties of opclass co-members

2014-09-24 Thread Tom Lane
It strikes me that there's a significant gap in the whole "leakproof function" business, namely that no consideration has been given to planner-driven transformations of queries. As an example, if we have "a = b" and "b = c", the planner may generate and apply "a = c" instead of one or both of tho