From 18bdcc88b8f5a724bb5fa0a105de30315e075f2c Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Fri, 1 Nov 2024 14:42:07 -0500 Subject: [PATCH] Add example of output to latest TIL --- postgres/generate-random-alphanumeric-identifier.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/postgres/generate-random-alphanumeric-identifier.md b/postgres/generate-random-alphanumeric-identifier.md index af0e989..a8141de 100644 --- a/postgres/generate-random-alphanumeric-identifier.md +++ b/postgres/generate-random-alphanumeric-identifier.md @@ -32,6 +32,16 @@ select string_agg( from positions, random_bytes, chars; ``` +Here is an example of the output: + +```sql ++----------+ +| short_id | +|----------| +| NXdu9AnV | ++----------+ +``` + The [`generate_series`](https://www.postgresql.org/docs/current/functions-srf.html) gives us an 8-row table from 0 to 7 that we can use as indexes into the byte