HackerTrans
TopNewTrendsCommentsPastAskShowJobs

msdrigg

no profile record

Submissions

Supabase ETL – Postgres Logical Replication Framework

supabase.com
1 points·by msdrigg·7 bulan yang lalu·0 comments

A man who's been waiting in jail for his day in court for 6 years

substack.com
27 points·by msdrigg·8 bulan yang lalu·8 comments

comments

msdrigg
·6 bulan yang lalu·discuss
The most interesting thing for me in this article was the mention of `MERGE` almost in passing at the end.

> I'm not a big fan of using the constraint names in SQL, so to overcome both limitations I'd use MERGE instead:

``` db=# MERGE INTO urls t USING (VALUES (1000004, 'https://hakibenita.com')) AS s(id, url) ON t.url = s.url WHEN MATCHED THEN UPDATE SET id = s.id WHEN NOT MATCHED THEN INSERT (id, url) VALUES (s.id, s.url); MERGE 1 ```

I use `insert ... on conflict do update ...` all the time to handle upserts, but it seems like merge may be more powerful and able to work in more scenarios. I hadn't heard of it before.
msdrigg
·7 bulan yang lalu·discuss
I think you might have terminal brain rot
msdrigg
·8 bulan yang lalu·discuss
I know I'm going to get downvoted into oblivion here but I do think it looks kinda nice -- like I might would buy one of the sweatshirts
msdrigg
·10 bulan yang lalu·discuss
The other two companies labeled as Columbia SC are actually Columbia Maryland too haha
msdrigg
·10 bulan yang lalu·discuss
3 companies in columbia sc but further investigation yields columbia md for 2 and columbia mo for the third. So state data seems pretty non-existent