Re: vacuumlo fails in the presence of a index on expression - demo sql included - Mailing list pgsql-bugs

From Tom Lane
Subject Re: vacuumlo fails in the presence of a index on expression - demo sql included
Date
Msg-id 12432.1092949808@sss.pgh.pa.us
Whole thread Raw
In response to vacuumlo fails in the presence of a index on expression - demo sql included  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
List pgsql-bugs
Frank van Vugt <ftm.van.vugt@foxi.nl> writes:
> CREATE FUNCTION get_level(varchar) RETURNS int LANGUAGE 'sql' IMMUTABLE STRICT
> SECURITY INVOKER AS 'SELECT id FROM level WHERE abbreviation = $1';

The bug is in this function: it's assuming that "level" will always be
in the current search path.  Perhaps you want "FROM public.level".

Frankly, since this function is clearly *not* immutable, almost any
misbehavior of an index depending on it is going to be considered
not-a-bug...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Frank van Vugt
Date:
Subject: vacuumlo fails in the presence of a index on expression - demo sql included
Next
From: Andrew Dunstan
Date:
Subject: Re: [pgsql-hackers-win32] postgresql 8.0b1 Win32 observations