Knowledgebase
tsearch functions?
Posted by Calibaba, 11-24-2008, 03:12 PM | tsearch functions?
It seems that some tsearch2 functions are inaccessible such as a set of rank() funcs. The default definition for one of the functions is shown in the following snippet of code:
CREATE OR REPLACE FUNCTION rank(real[], tsvector, tsquery)
RETURNS real AS
'$libdir/tsearch2', 'rank'
LANGUAGE 'c' IMMUTABLE STRICT;
I've tried to execute this script shown above and got the following error:
ERROR: permission denied for language c
rpm -qa | grep postgresql
postgresql-devel-8.3.5-1PGDG.rhel4
postgresql-server-8.3.5-1PGDG.rhel4
postgresql-8.3.5-1PGDG.rhel4
postgresql-libs-8.3.5-1PGDG.rhel4
postgresql-plpython-8.3.5-1PGDG.rhel4
|
Posted by Calibaba, 11-25-2008, 03:51 PM | I tried this via command linehttp://pgsql.privatepaste.com/8eGs8HDKUf
Still nothing changed.
Code:
root@server [~]# su - postgres
-bash-3.00$ psql user_dbname
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
user_dbname=# #
user_dbname-# CREATE OR REPLACE FUNCTION rank(real[], tsvector, tsquery)
user_dbname-# #
user_dbname-# CREATE LANGUAGE c
user_dbname-# \q
-bash-3.00$ exit
logout
|
Posted by Calibaba, 11-26-2008, 11:03 AM | Would appreciate help on this.
|
|
Add to Favourites
Print this Article |
Also Read