dbdev icon indicating copy to clipboard operation
dbdev copied to clipboard

how does dbdev compare to pgxn?

Open autra opened this issue 2 years ago • 1 comments

Improve documentation by explaining the difference with pgxn.

Link

Page which needs improvement: README.md.

Describe the problem

When I hear npm for pg, I immediately think about pgxn. I think It'd be useful to explain how these tools differ, what different use case they help with.

Describe the improvement

From my perspective, pgxn seems oriented towards extensions, while dbdev is more about regular piece of sql? Pgxn ships source code and gives an easy way to compile them. You'd need a shell access to the machine, and probably be superuser. Dbdev seems to be usable by user with less privilege?

autra avatar Apr 20 '23 09:04 autra

dbdev is a package manager for trusted language extensions (TLE) rather than native extensions. The key difference is that someone with server access has to install native extensions (like most of what's on pgxn) while any SQL users can safely install a TLE. The main limitation is not allowing C. We touch on that in the blog post https://supabase.com/blog/dbdev

When I hear npm for pg, I immediately think about pgxn. I think It'd be useful to explain how these tools differ, what different use case they help with.

Yeah, makes sense

The majority of users we're targeting dbdev towards have limited exposure to postgres extensions, and probably haven't heard of pgxn. For that group, the benefit of drawing contrast between native extensions and TLEs is limited.

When people drop in on the project's README our goal is for them to get a quick understanding of what the dbdev can enable them to do. Its tempting to explain the ecosystem, but that can be overwhelming for newcommers.


Even so, if you're interested in opening a PR extending the readme to explain the difference you think are most important I'd be very happy to take a look!

olirice avatar Apr 20 '23 15:04 olirice