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

wteja

Weerayut Teja

Posted on January 2, 2023

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

đź’– đź’Ş đź™… đźš©
wteja
Weerayut Teja

Posted on January 2, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related