Better HN
topnewbestaskshowjobs
Log inSign up

steve-chavez

620 karma · joined Jun 30, 2017 (9y ago) · 182 submissions

https://github.com/steve-chavez/
Submissions

comment 1w ago · link · parent

The hint is not a problem if you use the PostgreSQL default of deny for every table, Supabase is migrating to this default https://github.com/orgs/supabase/discussions/45329. If the defaults are in place even if you see the table name on the hint it will be inaccessible (fails immediately before RLS checks).

Note that the hint is added by PostgREST and it was introduced at a time where users manually typed table names, causing them to report malfunctions on typos. These hints are not as necessary anymore so they're usually disabled via config[1] and will likely be dropped on a next version.

[1]: https://docs.postgrest.org/en/v16/references/configuration.h...

2.

A Farewell to Hubs(arcan-fe.com ↗)

2 points · by steve-chavez · 2w ago · discuss

3.

The Future of Software Engineering [pdf](thoughtworks.com ↗)

2 points · by steve-chavez · 4mo ago · discuss

comment 4mo ago · link · parent

Many thanks! It took me a long time to come up with the interface. I've been wanting a good parser combinator library for C since 2023 when I contributed to mpc[1]:

[1]: https://github.com/orangeduck/mpc/commits?author=steve-chave...

5.

Single header Parser Combinators for C(github.com ↗)

80 points · by steve-chavez · 4mo ago · 15 comments

comment 6mo ago · link · parent

Many thanks for your work pramsey. We use that exact function [1], do you have any plans for a similar function for TopoJSON? One that also has a record parameter? [2].

[1]: https://github.com/PostgREST/postgrest/blob/f1d0e8ea2266077d...

[2]: PostGIS has https://postgis.net/docs/AsTopoJSON.html but it doesn't take a record.

comment 8mo ago · link · parent

One thing that is missing is a standard no-LLM policy, like the "Contributor Covenant Code of Conduct". On PostgREST we recently added a strict no-LLM policy [1], basically linking Gentoo's AI policy, which we found the most apt in lack of a standard.

[1]: https://github.com/PostgREST/postgrest/blob/main/CONTRIBUTIN...

comment 9mo ago · link · parent

> It's a replacement for SQL, the language

PostgREST doesn't provide a replacement, rather a subset of the SQL language meant to be safe to expose to untrusted (frontend) clients.

Load balancing is not built-in currently, but it can be done at the proxy layer, taking the advantage that GET/HEAD requests are always executed on read only transactions, so they can be routed to read replicas. This is what Supabase does [1] for example.

[1]: https://supabase.com/docs/guides/platform/read-replicas#api-...

comment 9mo ago · link · parent

> PostgREST translates HTTP straight into SQL, so if you get a policy wrong (or forget one), game over

Do note that by default in PostgreSQL/PostgREST, RLS is the third layer of AuthZ defense, you have table and column level security before and these are closed by default.

> In Supabase's model, it's a breach.

Supabase is currently working on being closed by default.

10.

PgPointcloud – A PostgreSQL extension for storing point cloud (Lidar) data(pgpointcloud.github.io ↗)

3 points · by steve-chavez · 1y ago · discuss

11.

FFI Overhead(github.com ↗)

2 points · by steve-chavez · 1y ago · 1 comment

12.

Asynchronous Exceptions in Practice (2017)(simonmar.github.io ↗)

1 points · by steve-chavez · 1y ago · discuss

13.

pg_csv: Flexible CSV Processing for Postgres(github.com ↗)

2 points · by steve-chavez · 1y ago · discuss

comment 1y ago · link · parent

I played starcraft2 13 years ago on Linux, the wizard installer worked just fine.

15.

PostgreSQL Event Triggers without superuser access(supabase.com ↗)

1 points · by steve-chavez · 1y ago · discuss

16.

PostgreSQL Event Triggers without superuser access(supabase.com ↗)

4 points · by steve-chavez · 1y ago · discuss

17.

PostgreSQL Event Triggers without superuser access(supabase.com ↗)

2 points · by steve-chavez · 1y ago · discuss

18.

Domain Representations(docs.postgrest.org ↗)

2 points · by steve-chavez · 1y ago · 1 comment

comment 1y ago · link · parent

Not really, the work is much reduced.

1. If your function returns a table type, you can reuse all the filters that PostgREST offers on regular tables or views [1].

2. The SQL code will be much more concise (and performant, which leads to less maintenance work) than the code of a backend programming language.

3. The need for migrations is a common complaint, but you can treat SQL as regular code and version control it. Supabase recently released some tooling [2] that helps with this.

[1]: https://docs.postgrest.org/en/v12/references/api/functions.h...

[2]: https://supabase.com/docs/guides/local-development/declarati...

comment 1y ago · link · parent

Yes, it does many-to-many joins automatically: https://docs.postgrest.org/en/v12/references/api/resource_em....

comment 1y ago · link · parent

> My server is going to provide an API that isolates the application from the DB structure.

The same can be achieved with "schema isolation". See https://docs.postgrest.org/en/v12/explanations/schema_isolat....

comment 1y ago · link · parent

> If my DB structure changes, I have to force new app versions on every platform because I didn't insulate back-end changes with an API.

To avoid the above problem, it's a standard practice in PostgREST to only expose a schema consisting of views and functions. That allows you to shield the applications from table changes and achieve "logical data independence".

For more details, see https://docs.postgrest.org/en/v12/explanations/schema_isolat....

23.

Introduction to NixOS Specialisations (2022)(tweag.io ↗)

1 points · by steve-chavez · 1y ago · discuss

comment 1y ago · link · parent

I think you want to link to https://news.ycombinator.com/item?id=41956044.

25.

Beyond Relations: A Case for Elevating to the Entity-Relationship Abstraction [pdf](vldb.org ↗)

2 points · by steve-chavez · 1y ago · discuss

26.

Ask HN: Devshops Websites for Inspiration

1 points · by steve-chavez · 1y ago · discuss

comment 1y ago · link · parent

So cool! For some reason navigating to Github/Discord by clicking the links is slow on my phone (old galaxy s20fe). The click highlight of the button is normal, just going to the sites is slow.

comment 2y ago · link · parent

There's not much substance in the reply there, on one part there's this argument:

> Go programs are fast enough for Google, Netflix, Stripe, and many other large Internet companies… it’s probably fast enough for you

Which of course is an appeal to authority. Overall, it's pretty well known that a GC language will have downsides in perf when compared to system programming languages.

1234567