Skip to content

Generation functions in the TSID DuckDB extension

Function category

Generation

1 function

Mint a new TSID. Calling `tsid()` repeatedly produces strictly increasing values (by string compare) suitable as primary keys.

tsid

Scalar function Generation
Signature
tsid() VARCHAR
Description
1 One-off ID
SELECT tsid();
2 Bulk generation with random seed
SELECT tsid() AS id FROM range(100);