Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use uuid and create an extension to use it

I want to use uuid in Postgresql 9.2 on Ubuntu 13. So when I tried to check whether is available or not, I did:

select uuid_generate_v4() as one; 

And it gave me ERROR: function uuid_generate_v4() does not exist

Then I did CREATE EXTENSION "uuid-ossp";

ERROR:  could not open extension control file "/usr/share/postgresql/9.2/extension/uuid-ossp.control": No such file or directory 

Well, what do I do next?

By the way, SELECT * FROM pg_available_extensions; returns plpsql (1.0) only.

like image 763
Incerteza Avatar asked Dec 28 '13 04:12

Incerteza


1 Answers

The operating system package that contains the extension is not installed. To install it:

apt-get install postgresql-contrib-9.2 
like image 198
Peter Eisentraut Avatar answered Sep 28 '22 14:09

Peter Eisentraut