DEV Community

Weerayut Teja
Weerayut Teja

Posted on

How to deal with : Function uuid_generate_v4() does not exist on PostgreSQL

Some time when you create the table on PostgreSQL and want to use UUID Generator V4 on uuid field but turn out that you got this error.

Function uuid_generate_v4() does not exist
Enter fullscreen mode Exit fullscreen mode

To resolve this problem, just run this command in the SQL Editor

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Enter fullscreen mode Exit fullscreen mode

Note: you also need to have uuid-ossp.control extension to be available provided by postgresql-contrib package

Latest comments (0)