ERROR: permission denied for language c

That’s right, according to doc:

Only superusers can create functions in untrusted languages

Quick check:

SELECT lanpltrusted FROM pg_language WHERE lanname LIKE 'c';
 lanpltrusted 
--------------
 f
(1 row)

If you really want this, then you could modify pg_language system catalog (ALTER LANGUAGE doesn’t have such option):

UPDATE pg_language SET lanpltrusted = true WHERE lanname LIKE 'c';

Per user @Otheus below: the UPDATE statement must be done in the DB where the function will reside.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)