# uuid-ossp — Postgres extension

> UUID generators (v1 to v5).

Source: https://scribase.com/extensions/uuid-ossp

Category: Data types. Version: 1.1. Enabled on every project by the platform.

## About

uuid-ossp generates UUIDs of versions 1, 3, 4 and 5. For random v4 values the built-in gen_random_uuid() is enough; reach for uuid-ossp when you need name-based v5 UUIDs that are the same every time for the same input.

## Enable it

```sql
create extension if not exists "uuid-ossp" with schema extensions;
```

## Example

```sql
select uuid_generate_v4();

-- the same input always gives the same v5 UUID
select uuid_generate_v5(uuid_ns_url(), 'https://example.com/products/42');
```

Upstream: https://www.postgresql.org/docs/17/uuid-ossp.html