[Postgresql] uuid 생성함수
uuid 생성방법에는 여러가지가 있다. 방법1. CREATE OR REPLACE FUNCTION gen_uuid() RETURNS uuid stable language sql as 'SELECT md5(random()::text || clock_timestamp()::text)::uuid'; SELECT gen_uuid(); 방법2 CREATE EXTENSION "uuid-ossp"; SELECT uuid_generate_v4();
2022.12.13