Q: How to sort arrays in PostgreSQL?
A: `select array(select unnest(x) order by 1)`
where `x` is a column of array type.
That's the neatest implementation that I was able to find.
I was hoping for optimized `array_sort()` but it doesn't seem to exist.
Interestingly, I couldn't find any mention of `array()` in Postgres docs.
#postgres #sql
#nostr is currently heavily evolving and devs actively looking for solutions
There might be a right way, but it's still unclear which one would that be.
I love how diverse the landscape is ATM.
In #postgres, BRIN index does not support min()/max().
A little unexpected... :(
That would be useful for dbt incremental models pulling data from large naturally ordered tables.
Have you considered a more generic approach for time series in general?
This could be used not only for financial data but other things, e.g., sensors, etc
A small glider in TikZ...
```
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[background rectangle/.style={fill=white}, inner frame sep=0, show background rectangle]
\foreach \pos in {(1,1), (2,1), (2,2), (3,2), (1,3)} {
\fill \pos rectangle +(1,1);
}
\draw[color=white, ultra thick] (0.5, 0.5) grid (4.5, 4.5);
\end{tikzpicture}
\end{document}
```
#tikz #gameoflife
On 2024-01-12, I participated in a mini workshop about Data Vault by https://www.scalefree.com. It is called Data Vault Friday, and one question from participants is answered in detail. Last week, someone asked about modeling of dates in reference tables. It was relatively basic, but well structured, and most importantly true DV2.0 material -- I'll keep attending it.
#datavault #datawarehouse
here's the video: https://www.youtube.com/watch?v=s41Ootv_dBA
Experimenting with SimpleX. If you want to say hi, there's my address: https://simplex.chat/contact#/?v=1-4&smp=smp%3A%2F%2FPtsqghzQKU83kYTlQ1VKg996dW4Cw4x_bvpKmiv8uns%3D%40smp18.simplex.im%2FyQJsZeMVTaaGZ1uMKhW_6WPf-jr6PcnR%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAc2-FlZrGsaC4ztSY2XmSvbQfbXLgr2pR-Ixc4r7rk08%253D%26srv%3Dlyqpnwbs2zqfr45jqkncwpywpbtq7jrhxnib5qddtr6npjyezuwd3nqd.onion
On 2024-01-12, I participated in a mini workshop about Data Vault by https://www.scalefree.com. It is called Data Vault Friday, and one question from participants is answered in detail. Last week, someone asked about modeling of dates in reference tables. It was relatively basic, but well structured, and most importantly true DV2.0 material -- I'll keep attending it.
#datavault #datawarehouse
+-----------+
| ASCII box |
+-----------+
#ascii using Unicode Full-Width Characters: http://xahlee.info/comp/unicode_full-width_chars.html
Why do you do it?
https://news.ycombinator.com/item?id=37351668
Current discussion about #nostr
I'm excited to read a draft for the new Data Architecture Specification in Data Vault 2.1 #datavault
https://datavaultalliance.com/news/dv/dv-standards/dv2-1-draftdataarchspec-v2-1-0/
TIL that adding a unique constraint to a table in #postgres will automatically create an index.
I've discovered after noticing duplicated indexes in one of our tables.
