Generation functions in the TSID DuckDB extension
Function category
Generation
1 functionGenerate a timestamp-prefixed TSID with tsid(). Use ORDER BY for sorted results; generation does not guarantee strict insertion or commit order.
Signature
tsid() → VARCHAR
Description
Generate a new Time-Sorted Unique Identifier as a 32-character hex string. tsid() takes no arguments. Its timestamp prefix supports time-based sorting; concurrent calls and clock changes do not establish strict insertion order.
1
One-off ID
SELECT tsid();
2
Bulk generation
SELECT tsid() AS id FROM range(100);