3

I would like to install pgcrypto in Windows. I have a file C:\Program\PostgreSQL\9.0\share\contrib\pgcrypto.sql but when I try to run it in psql I get an error:

C:: Permission denied

How do I solve this?

Jonas
  • 33,945
  • 27
  • 62
  • 64

1 Answers1

3

Depending on the full error message you receive (I have a hunch you didn't post it in full) you probably are trying to run the script by using a login role which is not superuser:

C:\Users\Administrator>c:\PostgreSQL\9.0\bin\psql.exe -U milen -f C:\PostgreSQL\9.0\share\contrib\pgcrypto.sql milen
SET
psql:C:/PostgreSQL/9.0/share/contrib/pgcrypto.sql:9: ERROR:  permission denied for language c
psql:C:/PostgreSQL/9.0/share/contrib/pgcrypto.sql:14: ERROR:  permission denied for language c
psql:C:/PostgreSQL/9.0/share/contrib/pgcrypto.sql:19: ERROR:  permission denied for language c
...
Milen A. Radev
  • 1,648
  • 14
  • 13