Sample Header Ad - 728x90

psql 9.5: gen_random_uuid() not working

19 votes
1 answer
46098 views
SELECT gen_random_uuid() produces output ERROR: function gen_random_uuid() does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. I ran CREATE EXTENSION pgcrypto; on selected database and SELECT gen_random_bytes(1) works perfectly (gen_random_bytes doesn't work on other databases where pgcrypto extension was not manually created). % psql --version psql (PostgreSQL) 9.5.3 Ubuntu version is 16.04.
Asked by d9k (293 rep)
Aug 8, 2016, 03:22 AM
Last activity: Aug 8, 2016, 07:59 PM