Forum OpenACS Q&A: Errors when loading data-model

Collapse
Posted by Eric Cohen on
Hello, I'm getting lots of "Unrecognized language" errors when I
attempt to load the data-model.  I'm using PostgreSQL 7.0 (on HP-UX
10.20), and ACS/pg 3.2.2beta3.  I'm following the installation
directions given on the openacs website.  Here is a small sampling of
the errors I'm getting (note that these errors occur in many other
places during the datamodel loading):

psql:sdm.sql:235: ERROR:  Unrecognized language specified in a CREATE
FUNCTION: 'plpgsql'.  Recognized languages are sql, C, internal and
the created procedural languages.

psql:sdm.sql:256: ERROR:  Unrecognized language specified in a CREATE
FUNCTION: 'plpgsql'.  Recognized languages are sql, C, internal and
the created procedural languages.

psql:sdm.sql:264: NOTICE:  CREATE TABLE/PRIMARY KEY will create
implicit index 'baf_status_pkey' for table 'baf_status'

psql:sdm.sql:292: NOTICE:  CREATE TABLE/PRIMARY KEY will create
implicit index 'bugs_and_features_pkey' for table 'bugs_and_features'

psql:sdm.sql:292: NOTICE:  CREATE TABLE will create implicit
trigger(s) for FOREIGN KEY check(s)

psql:sdm.sql:355: ERROR:  Unrecognized language specified in a CREATE
FUNCTION: 'plpgsql'.  Recognized languages are sql, C, internal and
the created procedural languages.

psql:sdm.sql:360: ERROR:  CreateTrigger: function trig_baf_audit()
does not exist

psql:sdm.sql:377: ERROR:  Unrecognized language specified in a CREATE
FUNCTION: 'plpgsql'.  Recognized languages are sql, C, internal and
the created procedural languages.

psql:sdm.sql:382: ERROR:  CreateTrigger: function
trig_lowlevel_baf_audit() does not exist

psql:sdm.sql:391: NOTICE:  CREATE TABLE/PRIMARY KEY will create
implicit index 'baf_ratings_pkey' for table 'baf_ratings'

psql:sdm.sql:391: NOTICE:  CREATE TABLE will create implicit
trigger(s) for FOREIGN KEY check(s)

psql:sdm.sql:400: NOTICE:  CREATE TABLE will create implicit
trigger(s) for FOREIGN KEY check(s)

psql:sdm.sql:408: NOTICE:  CREATE TABLE/PRIMARY KEY will create
implicit index 'bug_release_map_pkey' for table 'bug_release_map'

Thanks for any assistance!

Collapse
Posted by Dan Wickstrom on
It looks like the pl/sql procedural language didn't get installed.  Do a dropdb yourdb, createdb yourdb and then do psql -f postgres.sql yourdb >& error.log. Now look for errors in the error.log file.  The postgres.sql file loads the pl/sql procedural language.  Maybe the path in that file for plpgsql.so doesn't match the location of the library on your machine.
Collapse
Posted by Don Baccus on
Dan's right.  The other messages labelled "NOTICE" are just that, notices, not ERRORs.  They're just informing you of additional stuff Postgres is creating for you.  For instance, a primary key always has an index associated with it, even if you don't specify one, so Postgres tells you when it makes one for you.
Collapse
Posted by Cory Bosley on
Ack!
Um, another problem could be if you comment out the wrong line in postgres.sql.
I accidentally commented out i postgres.sql :)
This could be a bad thing :)
Collapse
Posted by Don Baccus on
A simple way to add in plpgsql is to use "createlang" when creating the user and database, while logged in as the postgres admin.  The syntax is "createlang plpgsql database_name".