SET search_path TO public;
DROP EXTENSION IF EXISTS "uuid-ossp";
CREATE EXTENSION "uuid-ossp" SCHEMA public;
If this is a fresh installation you can skip SET
and DROP
. Credits to @atomCode (details)
After this, you should see uuid_generate_v4() function IN THE RIGHT SCHEMA (when execute \df
query in psql command-line prompt).
schemaname.
qualifier):CREATE TABLE public.my_table (
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,