Hi Julian,
according to log, it looks like database installation didn't finish
correctly. create_object() is postgresql stored procedure written in
plpgsql language. This language must be installed (createlang command)
into database before SQL script with FRED database structure is loaded.
We have fred-dbmanager script that takes care of this dependency:
$ grep -A4 -B5 createlang /usr/sbin/fred-dbmanager
if [ "$(get_db_version)" = "" ]; then
/usr/bin//createuser fred -SDR -p 5432 > /dev/null 2>&1
/usr/bin//createdb fred -O fred -E UTF8 \
-p 5432 > /dev/null 2>&1
/usr/bin//createlang plpgsql fred \
-p 5432 > /dev/null 2>&1
/usr/bin//psql fred -U fred -f $STRUCTSQL -p 5432 >/dev/null
2>&1
fi
In default installation command '/usr/sbin/fred-dbmanager install' is
called during fred startup inside command '/etc/init.d/fred-server
start'.
So either you created database using some other mechanism and you will
have to repeat it again with using 'createlang' or something is broken
with these scripts. In that case try to call fred-dbmanager manually and
check if everything is ok for example this way:
$ LC_ALL=en_US psql fred -U fred -c "select * from pg_language where
lanname='plpgsql';"
lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator |
lanacl
---------+---------+--------------+---------------+--------------+--------
plpgsql | t | t | 16386 | 16387 |
(1 row)
$ LC_ALL=en_US psql fred -U fred -c "\df create_object"
List of functions
Schema | Name | Result data type | Argument
data types
--------+---------------+------------------+---------------------------------------------------------
public | create_object | integer | crregid integer, oname
character varying, otype integer
(1 row)
Regards,
Jaromir
Julian De Marchi píše v Út 04. 11. 2008 v 16:57 +1000:
Julian De Marchi wrote:
Hey Guys,
I have got FRED operating today. However, when I use fred-client and
try and create_contacts I get command failed.
Below is the output;
wogg_85(a)192.168.0.19> create_contact CID:ID02 'Jan Ban' info(a)mail.com
Street Brno 123000 CZ
Do you really want to send this command to the server? (y/N): y
ERROR: Command failed
Also just found this in the postgres logs;
2008-11-05 02:56:21 EST ERROR: function create_object(integer,
unknown, integer) does not exist at character 8
2008-11-05 02:56:21 EST HINT: No function matches the given name and
argument types. You might need to add explicit type casts.
2008-11-05 02:56:21 EST STATEMENT: SELECT create_object(5,'001',1)
Hope that helps. Am also using all the version specified on the howto
website.
_______________________________________________
Fred-users mailing list
Fred-users(a)lists.nic.cz
https://lists.nic.cz/mailman/listinfo/fred-users