ERROR: must be owner of extension plpgsql

25 Apr ยท by Tim Kamanin ยท 1 min read

Today while moving Django/PostgreSQL site between servers and importing an SQL dump into the new location I got a surprising error " ERROR: must be owner of extension plpgsql". I'm already used to PostgreSQL quirks so after a quick search I came to the following solution: Login as postgres user and do:

psql template1

then:

alter role your_role_name with superuser;

That will make your current user as superuser and give him permissions to own plpgsql language.

Want to get more ๐Ÿ”ฅ tips like this one?

Subscribe to get notified about new dev tutorials