## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> UUID_GENERATE_V8[UUID_GENERATE_V8]:::quoted
UUID_GENERATE_V8 --> End((END))
```
## Purpose
The `UUID_GENERATE_V8` SQL function creates a UUID of version 8 (RFC 9562) from custom data. The data has the form of a UUID. The function sets the version and the variant, and keeps the other 122 bits as they are. A version 8 UUID has a layout of your own, which RFC 9562 leaves open; the function makes sure that the UUID is valid in the eyes of other systems.
PostgreSQL has no function for version 8.
Available from release 28.0.
See also [[UUIDV7]], [[UUID_GENERATE_V5]] and [[UUID_EXTRACT_VERSION]].
Parameters:
- Data (`guid`): the data, or the text of a UUID.
The result is `null` when the data is `null`. Text which is no UUID raises `itgenduy005`.
Returns: the UUID of version 8, of data type `guid`.
## Examples
The following example stamps the version and the variant on a UUID:
```sql
select uuid_generate_v8('00112233-4455-6677-0899-aabbccddeeff')
------------------------------------
00112233-4455-8677-8899-aabbccddeeff
```