Re: [HACKERS] Avoiding execution of some functions by query rewriting

2012-05-16 Thread Florian Pflug
On May16, 2012, at 14:30 , Thomas Girault wrote: > I would like to allow the execution of a function (my_function) only if its > argument (my_table.x) belongs to a predefined interval (e.g. [100,1000]). > > Let's take the following query example : > (q) SELECT * FROM my_table WHERE my_function(m

Re: [HACKERS] Avoiding execution of some functions by query rewriting

2012-05-16 Thread Tom Lane
Thomas Girault writes: > Hello, > I would like to allow the execution of a function (my_function) only if its > argument (my_table.x) belongs to a predefined interval (e.g. [100,1000]). > Let's take the following query example : > (q) SELECT * FROM my_table WHERE my_function(mytable.x); > I wou

[HACKERS] Avoiding execution of some functions by query rewriting

2012-05-16 Thread Thomas Girault
Hello, I would like to allow the execution of a function (my_function) only if its argument (my_table.x) belongs to a predefined interval (e.g. [100,1000]). Let's take the following query example : (q) SELECT * FROM my_table WHERE my_function(mytable.x); I would like this query automatically re