Skip to main content
Share Your Experience: Take the 2024 Developer Survey
36 votes
Accepted

psql 9.5: gen_random_uuid() not working

you can check if the functions are defined using select pg_get_functiondef(to_regproc('gen_random_bytes')); select pg_get_functiondef(to_regproc('gen_random_uuid')); or: select * from pg_proc where ...
cohenjo's user avatar
  • 1,188
9 votes
Accepted

Do I need to execute "create extension pgcrypto" everytime?

pgcrypto is a regular Postgres extension. You have to install it once per database (not per DB cluster like you may have been assuming) to use it. Installation is permanent, surviving DB restarts. If ...
Erwin Brandstetter's user avatar
6 votes

Adding unsigned 256 bit integers in PostgreSQL

Using pg-bignum The pg-bignum library does what you want. I just patched it to accept hex input. Download the library. Run make sudo make install Now, run CREATE EXTENSION bignum; Now you can ...
Evan Carroll's user avatar
  • 63.6k
5 votes

In RDS digest function is undefined after creating pgcrypto extension

My coworker discovered the issue, in case anyone is having a similar problem, the issue was that pgcrypto had been installed into a schema that was not public. So the query for reported installed ...
chris's user avatar
  • 201
3 votes
Accepted

How to install pgcrypto extension in postgres 10 on CentOS 7

From the docs on CREATE EXTENSION PostgreSQL will create the extension using details from the file SHAREDIR/extension/extension_name.control. You need to check what SHAREDIR is set to with ...
Evan Carroll's user avatar
  • 63.6k
3 votes

Encryption with pgcrypto

There is no way to avoid the drawbacks of symmetric encryption on the server. PostgreSQL has to have access to the key and the encrypted data to decrypt it if you want to "avoid having the ...
Evan Carroll's user avatar
  • 63.6k
2 votes

Detect if `pg_crypto` in Postgres was built with strong random feature enabled

--disable-strong-random is a PostgreSQL configuration option available in the ./configure script in the source code. You could check to see if your version of PostgreSQL and the associated contrib ...
Kassandry's user avatar
  • 3,659
2 votes

Need to encrypt certain columns in a table but also be able to sort and search

You don't want to encrypt specific columns, what you want to do is encrypt the filesystem that the database is written to, and any backups of your database that you make. AWS offers facilities for ...
Larry's user avatar
  • 377
2 votes

Adding unsigned 256 bit integers in PostgreSQL

I couldn't find a good answer to the underlying question of converting a very large hexadecimal number to a numeric type, so even though it's several years late, here's my alternative approach: ...
colophonemes's user avatar
2 votes

How do I install pgcrypto in PostgreSQL 8.4?

For the latest version, there is no file path end with pgcrypto.sql . Create an extension pgcrypto under the required user. $ psql -U <username> -d mydb psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04....
Veeresh Digasangi's user avatar
1 vote
Accepted

(PostgreSQL pgcrypto) How to generate blowfish hash without salt?

It is trivial to use the same salt every time. Just do it: select crypt('SomeTextHere','$2a$16$aaaaaaaaaaaaaaaaaaaaaa'); If you don't want any salt at all, you would need to go write some code to ...
jjanes's user avatar
  • 40.1k
1 vote

How exactly are the password hashing functions in the pgcrypto module different from the regular MD5 and other algorithms?

Since Postgresql is open source, you can find the code of hashing algorithms easily. Basically, pg_crypt function calls px_crypt function which picks algoritm and calls related hashing function for ...
Sahap Asci's user avatar
  • 2,969
1 vote

How to install pgcrypto extension in postgres 10 on CentOS 7

This worked on our Centos 8 device. [root~]$ sudo yum install postgresql-contrib Last metadata expiration check: 0:02:07 ago on Wed 28 Oct 2020 02:37:38 UTC. Dependencies resolved. ===================...
Keith John Hutchison's user avatar
1 vote

How to install pgcrypto extension in postgres 10 on CentOS 7

What worked for me is first this in bash shell: sudo yum install postgresql10-contrib Then in postgres: CREATE EXTENSION pgcrypto;
scottlittle's user avatar
1 vote

How to install pgcrypto extension in postgres 10 on CentOS 7

Since you already installed postgresql using yum, all you have to do is to install the -contrib. Keep in mind you still need to delete those files you copied or linked, then run this command. yum ...
Terry's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible