Thanks for the reply. I followed the link to the upgraded tutorial.
I am still experiencing the same difficulty. After creating the files, using gedit. For the first file, i named it plpgsql.sql and then put all the content that was below it in the text file, i.e,
"SET search_path = public, pg_catalog;
CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler
AS '$libdir/plpgsql', 'plpgsql_call_handler'
LANGUAGE c;
CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;"
and then saved the file. Did same with CreateDatabase.sql.
i placed them in the home directory. Your tutorial said or any other working directory. Could you clarify what you mean by a working directory?
I hope i am correct in assuming that i should use the terminal to carry out the instructions in the tutorial.
when i ran su postgres and i then copied and pasted the instruction:"psql -d template1 -f plpgsql.sql" i get this output from the terminal:
mbuotidem@NET-SERVER-PC:~$ su postgres
Password:
postgres@NET-SERVER-PC:/home/mbuotidem$ psql -d template1 -f plpgsql.sql
could not change directory to "/home/mbuotidem"
plpgsql.sql: No such file or directory
postgres@NET-SERVER-PC:/home/mbuotidem$ psql -d template1 -f CreateDatabase.sql
could not change directory to "/home/mbuotidem"
CreateDatabase.sql: No such file or directory
postgres@NET-SERVER-PC:/home/mbuotidem$ createuser --pwprompt --no-adduser --no-createdb mojo
could not change directory to "/home/mbuotidem"
Enter password for new role:
Enter it again:
Shall the new role be allowed to create more new roles? (y/n) y
createuser: creation of new role failed: ERROR: role "mojo" already exists
postgres@NET-SERVER-PC:/home/mbuotidem$
Yes, i have installed pgadminIII and i am going through the help files.
Any help would be appreciated.