Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1

    Unanswered: Procedural Language Error

    I was restoring a PostgreSQL dump file that came from a different server and I've never seen this error before:

    Code:
    carlos@db1:~$ createdb -T template0 finance
    carlos@db1:~$ psql ide < /tmp/finance.pgsql 
    SET
    SET
    SET
    SET
    SET
    SET
    COMMENT
    ERROR:  syntax error at or near "PROCEDURAL"
    [LINE 1: CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
                              ^
    ERROR:  language "plpgsql" does not exist
    SET
    SET
    SET
    CREATE TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    ALTER TABLE
    ALTER TABLE
    ALTER TABLE
    ALTER TABLE
    ALTER TABLE
    REVOKE
    REVOKE
    GRANT
    GRANT
    Is there a particular reason anyone can see why I'm receiving this error and what I should do? I think I possibly did a 'pg_dump' for this 'finance' database on 9.0.2 and our new database server is running 8.4.6. I honestly have no idea so that's why I'm posting this here.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by CarlosinFL View Post
    I think I possibly did a 'pg_dump' for this 'finance' database on 9.0.2
    and that is your problem. With 9.0 plpgsql was installed by default so it's not part of the dump any more.

    Simply create plpgsql in your 8.4 installation before importing the dump and you should be fine

  3. #3
    Join Date
    May 2008
    Posts
    277
    Quote Originally Posted by CarlosinFL View Post
    Code:
    LINE 1: CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
    Actually, I think this is your problem. Creating plpgsql is part of the dump, but the OR REPLACE clause wasn't introduced until 9.

  4. #4
    Join Date
    Feb 2012
    Posts
    1

    That was my problem.

    I was having the same issue and removed "OR REPLACE" from the sql file. That did the trick.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •