Error installing pgcrypto extension I want to install the pgcrypto extension on my postgresql installation on Windows. I found that I just have to call CREATE EXTENSION pgcrypto; but I've got an error :

Syntax error on « CREATE »
LINE 1: SELECT COUNT(*) AS total FROM (CREATE EXTENSION pgcrypto) AS...


(I'm on PostgreSQL 9.2.4 and I executed the sql line from phpPgAdmin with postgres user)
As dezso said in the comment, the problem was that CREATE can't be part of a subquery. And phpPgAdmin transform the query before executing it so it had put the CREATE as a subquery.

So the solution was to execute the CREATE query in PgAdmin for example.