Upon enabling Transliteration on a test install, I get the following errors:
- warning: pg_query() [function.pg-query]: Query failed: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database. in /srv/http/localhost/htdocs/comics/includes/database.pgsql.inc on line 139.- user warning:
query: CREATE OR REPLACE FUNCTION substring_index(text, text, integer)
RETURNS text AS $$
DECLARE
tokens text[];
BEGIN
tokens := pg_catalog.string_to_array($1, $2);IF $3 >= 0 THEN
RETURN pg_catalog.array_to_string(tokens[1:$3], $2);
ELSE
RETURN pg_catalog.array_to_string(tokens[($3 * -1):pg_catalog.array_upper(tokens, 1)], $2);
END IF;
END;
$$ IMMUTABLE STRICT LANGUAGE PLPGSQL; in /srv/http/localhost/htdocs/comics/sites/all/modules/transliteration/transliteration.install on line 43.- warning: pg_query() [function.pg-query]: Query failed: ERROR: function substring_index(character varying, unknown, integer) does not exist
LINE 1: SELECT fid, filepath FROM files WHERE SUBSTRING_INDEX(filepa...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts. in /srv/http/localhost/htdocs/comics/includes/database.pgsql.inc on line 139.- user warning:
query: SELECT fid, filepath FROM files WHERE SUBSTRING_INDEX(filepath, '/', -1) ~* '[^0-9A-Za-z_.-]' in /srv/http/localhost/htdocs/comics/sites/all/modules/transliteration/transliteration.install on line 69.
Comments
Comment #1
stormsweeper commentedYou need the "plpgsql" language installed into Postgres, which is not by default. I just ran into this myself.
Comment #2
stormsweeper commentedMore on this:
http://www.postgresql.org/docs/8.3/static/sql-createlanguage.html
The quick answer:
This might work run as your database owner rather than the superuser for the db if your configuration supports it (see above link).
If you already installed, you need to uninstall the module, which needs to be done from the db since there is not an uninstall hook.
Comment #3
smk-ka commentedSince today the dependency on SUBSTRING_INDEX is gone in CVS.