can't install PL\PgSQL language

Posted on 2004-11-11
Last Modified: 2010-05-18
hey folks,

here is the problem: i tried to run an sql script against my PostgreSQL database and i get this error:

 lvassilev@CM12228989 ~/cygwin
$ psql -d mydbname -h -U lvassilev < test.sql
ERROR:  language "plpgsql" does not exist
HINT:  You need to use "createlang" to load the language into the database.

So i am guessing i need to install the "plpgsql" language in my PostgreSQL db. so i do this:

lvassilev@CM12228989 ~/cygwin
$ createlang plpgsql -d mydbname -h -U lvassilev
createlang: language installation failed: ERROR:  permission denied for language

i guess that means i don't have permission to do this. I am not a superuser on this database, i just log in to it remotely as a regular user. Does that mean i need to ask my DBA to do it for me or what?

i am logging to PostgreSQL through CygWin command prompt on a Windows XP professional machine.

thanks much.
Question by:Lou1
    1 Comment
    LVL 22

    Accepted Solution

    Yup you need to be superuser for that database.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: ( This requires some add-o…
    Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now