I'm trying to run an inline query on my database - which has the citext
extension installed (using CREATE EXTENSION
) - and yet the executed query keeps throwing this error when calling a function:
type "citext" does not exist
DO
LANGUAGE plpgsql
$$
DECLARE
_id INT;
BEGIN
SELECT * FROM "dbo"."MyFunction"(_id, 'some value'::citext);
END;
$$;
If I omit the ::citext
cast, it says:
function dbo.MyFunction(integer, unknown) does not exist. You might need to add explicit type casts.
The citext
extension is added, is part of the schema and works with other queries. This keeps coming up randomly - what causes it?
EDIT: The installed extensions:
extname | nspname
----------+-----------
plpgsql | pg_catalog
citext | public
uuid-ossp | public
Search path:
show search_path;
search_path
-----------
dbo