Re: [GENERAL] index scan and functions
Le mardi 20 juillet 2010, à 10:11:21 +0200, Harald a écrit : In article 20100719162547.ga17...@localhost, arno a...@renevier.net writes: Thanks, that's exactly what I was looking for. No, I'd say you're looking for the ip4r package which provides an indexable IP address range type. Thanks, I'll look into it. signature.asc Description: Digital signature
Re: [GENERAL] index scan and functions
In article 20100719162547.ga17...@localhost, arno a...@renevier.net writes: Thanks, that's exactly what I was looking for. No, I'd say you're looking for the ip4r package which provides an indexable IP address range type. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] index scan and functions
On Mon, Jul 19, 2010 at 05:55:48PM +0200, arno wrote: But when using a custom function to compute my where parameter inet_to_bigint is a function that transform an inet address its integer representation. Is there a way, either to put function return value in a variable, or to tell postgres to still use a sequential scan ? I'd guess your function is labeled as VOLATILE. This is saying that the function has side effects, but from the function's name I'd guess that it doesn't and the only purpose of calling the function is to get its return value. I'd expect that labeling it as STABLE would cause PG to do what you're expecting. More details here: http://www.postgresql.org/docs/current/static/xfunc-volatility.html -- Sam http://samason.me.uk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] index scan and functions
Le lundi 19 juillet 2010, à 17:09:02 +0100, Sam a écrit : On Mon, Jul 19, 2010 at 05:55:48PM +0200, arno wrote: But when using a custom function to compute my where parameter inet_to_bigint is a function that transform an inet address its integer representation. Is there a way, either to put function return value in a variable, or to tell postgres to still use a sequential scan ? I'd guess your function is labeled as VOLATILE. This is saying that the function has side effects, but from the function's name I'd guess that it doesn't and the only purpose of calling the function is to get its return value. I'd expect that labeling it as STABLE would cause PG to do what you're expecting. More details here: http://www.postgresql.org/docs/current/static/xfunc-volatility.html Thanks, that's exactly what I was looking for. signature.asc Description: Digital signature