Recent submissions

Comment · 4 years ago
Wait, that's awesome! TIL.
Comment · 4 years ago
There seems to be an issue in Chrome in general. Thanks for reporting, I'll look into it. :)
Comment · 4 years ago
Comment · 4 years ago
Thank you for your kind words, and for checking it out! I'll look into it.
Comment · 4 years ago
Very true. I could use some advice for where to start. I replied to your Twitter DM!
Comment · 4 years ago
Unfortunately IDNs aren't allowed to have emojis. :( That definitely would've been fun though.
Comment · 4 years ago
I don’t understand what metrics you use for “more scalable” and “more maintainable”. If your application’s needs is sufficiently fulfilled by RLS, you don’t have to reinvent the wheel in the application level. Less code there to maintain is good.

Plus, I don’t see how “just by reading application code you can tell the expected behavior” doesn’t apply to RLS. Policies are written in a consistent format. USING for visibility, WITH CHECK for altering. I only have to keep an eye for these, and I’ll already get a good summary on what it does, no?

Comment · 4 years ago
Could you elaborate? I can update things just fine with a combination of USING, and WITH CHECK. USING can imply WITH CHECK too IIRC.
Comment · 4 years ago
You can create a role whose sole job is to switch to the roles needed. Doesn’t require you to escalate to superuser-level privileges that way. But still, if SQL injections aren’t properly considered then it’s possible for a user to gain more privileges than planned. Although SQL injections are usually mitigated by the DB libraries these days.

Also, it’s more convenient to use SET LOCAL ROLE <ROLE_NAME>, since that only keeps the role for the transaction. Manually resetting it is error prone (IME), and forgetting will have the supposedly “temporary” role bleed to the next transaction.

Comment · 4 years ago
UTF-8 as the de facto for `text` was merged a few months ago. It's in >=2.0.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton