DEV Community

Weerayut Teja
Weerayut Teja

Posted on

23 1

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

Top comments (4)

Collapse
 
smartdriver321 profile image
smartdriver321

Thanks. it's helpfull

Collapse
 
ayyoub_jadoo_08539104e1f0 profile image
Ayyoub Jadoo

Thank you

Collapse
 
rodrigo_vincius_6e1b72bf profile image
Rodrigo Vinícius

Worked like a charm! Thanks!

Collapse
 
farhan_nazmul_26526fb76d1 profile image
Farhan Nazmul

thanks

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay