UUID 生成
UUID v4 の識別子を1個から100個まで生成します。ハイフンを外したり大文字にしたり、JSON や SQL に合わせて出力できます。
ブラウザ内だけで動作します。入力した内容はどこにもアップロードされません。
UUID v4 はブラウザの crypto API で生成します。ランダムなだけで秘密情報ではないため、API キーには使わないでください。
生成中…UUID リファレンス
クイックリファレンス- 8-4-4-4-12
- ハイフンを含む36文字の標準形式です。ハイフンなしの16進形式は32文字です。
- v4
- 122ビットがランダムなので、調整なしでも衝突は事実上起こりません。
- v7
- 生成時刻順に並ぶ UUID で、データベースのインデックスを密に保てます。
- 00000000-0000-0000-0000-000000000000
- nil UUID で、明示的な空値として使います。
- gen_random_uuid()
- PostgreSQL 13 以降のサーバー側既定値関数です。MySQL では UUID() を使います。
- 秘密情報ではない
- UUID は実際には予測しにくいもののトークンではありません。API キーには使わないでください。
SQL の関連文法ガイド
SQL のガイドをすべて見るPostgres RLS 42P17: infinite recursion detected in policy
A policy on members that reads members re-enters itself. One security definer function with a pinned search_path ends the recursion and leaves the rest of the policy intact.
SQLPgBouncer Transaction vs Session Pooling: What Breaks
Port 6543 hands out a server connection per transaction, so prepared statements, SET, LISTEN and cursors stop behaving. Driver-level settings for each stack.
SQLZero-Downtime Postgres Migrations: lock_timeout and NOT VALID
One ALTER TABLE waiting behind a slow SELECT blocks every query that arrives after it. The timeout-retry loop, NOT VALID constraints and CONCURRENTLY index rules.
SQLPostgres JSONB Indexing: GIN vs Expression B-Tree
GIN answers containment, not equality, and an expression B-tree is the reverse. Choose by operator, match the expression exactly, and prove it with EXPLAIN.