Postgres unencrypted keyword is no longer supported

2.4k views Asked by At

When executing this postgres command:

EXECUTE 'CREATE USER myuser WITH UNENCRYPTED PASSWORD ''my+password''';

I see the error:

RoundhousE encountered an error.
Npgsql.PostgresException (0x80004005): 0A000: UNENCRYPTED PASSWORD is no longer supported

Is there a workaround for this, or will the password need to be manually encrypted and supplied without the UNENCRYPTED keyword?

2

There are 2 answers

3
Laurenz Albe On BEST ANSWER

No. All you have to do is to omit the UNENCRYPTED.

You can supply both encrypted and unencrypted passwords that way, and PostgreSQL can tell the difference automatically.

2
niainaLens On

PostgreSQL 10+ no longer support user creation with UNENCRYPTED password, create it with ENCRYPTED:

CREATE USER myuser WITH ENCRYPTED PASSWORD ''my+password''