mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add example of output to latest TIL
This commit is contained in:
@@ -32,6 +32,16 @@ select string_agg(
|
|||||||
from positions, random_bytes, chars;
|
from positions, random_bytes, chars;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Here is an example of the output:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
+----------+
|
||||||
|
| short_id |
|
||||||
|
|----------|
|
||||||
|
| NXdu9AnV |
|
||||||
|
+----------+
|
||||||
|
```
|
||||||
|
|
||||||
The
|
The
|
||||||
[`generate_series`](https://www.postgresql.org/docs/current/functions-srf.html)
|
[`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
|
gives us an 8-row table from 0 to 7 that we can use as indexes into the byte
|
||||||
|
|||||||
Reference in New Issue
Block a user