Thanks,
Katie
[postgres@slicerl sql]$ createdb xnat
CREATE DATABASE
[postgres@slicerl sql]$ createlang plpgsql xnat
[postgres@slicerl sql]$ psql
Welcome to psql 8.1.3, 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
postgres=# \c xnat
You are now connected to database "xnat".
xnat=# \i xnat
[... lots of output here...]
CREATE VIEW
CREATE TABLE
GRANT
psql:xnat.sql:3314: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
psql:xnat.sql:3343: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
psql:xnat.sql:3357: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
psql:xnat.sql:3376: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
psql:xnat.sql:3396: ERROR: language "plpgsql" does not exist
HINT: Use CREATE LANGUAGE to load the language into the database.
xnat=#
createlang -l -d xnat -U <postgres user name>
If plpgsql was created succesfully, the above command should display
something like:
Procedural Languages
Name | Trusted?
---------+----------
plpgsql | <no|yes>
There are two ways in which a language can be created. One is using
createlang and the other is using CREATE LANGUAGE SQL statement.
createlang is a wrapper for the second method.
CREATE LANGUAGE is the SQL command which adds procedural languages to
the currently connected database. Before it can be used, however, the
CREATE FUNCTION command must first be used to create the procedural
call handler.
Here are the steps to install using second method:
1. Launch psql and connect to db xnat
2. Execute
CREATE OR REPLACE FUNCTION plpgsql_call_handler()
RETURNS language_handler AS
'$libdir/plpgsql', 'plpgsql_call_handler'
LANGUAGE 'c' VOLATILE;
$libdir is a PostgreSQL representation of the directory specified as
the path to the shared objects library when PostgreSQL was configured.
This path, by default, is /usr/local/pgsql/lib/. You could find out the
path to the library files by executing pg_config --pkglibdir.
3. Execute
CREATE PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler;
4. Test if the creation of language was successfull.
Let us know if you have any problems
~Mohana
Katie
What Operating System are you on?
Thanks,
Tim
Katie
Hi, I got the same problem. But this resolution does not work for me.
I'm trying to configure XNat 1.6. on openSUSE 12.1 using postgre 9.1
Op dinsdag 14 maart 2006 06:00:52 UTC+1 schreef Mohana het volgende: