Peter
Peter

Reputation: 545

PostgreSQL - Language pgplsql does not exist despite running CREATE LANGUAGE

I just tried to create my first plpgsql function. When executing the script, I get

ERROR: language "‘plpgsql’" does not exist

I then run the command CREATE LANGUAGE plpgsql; which shows the following error:

ERROR: language "plpgsql" already exists

Commands are being run on the same database.

Regards

Peter

Upvotes: 14

Views: 25161

Answers (2)

ls270400
ls270400

Reputation: 321

use this command:

$: createlang -d dbname plpgsql

Upvotes: 22

user80168
user80168

Reputation:

please notice that you have extra characters in your error. Most likely you wrote:

create function ... language ‘plpgsql’

kind of like mysql quotes things. It's bad syntax. Just make it

create function ... language plpgsql

Upvotes: 18

Related Questions