News for hackers. Stuff that matters.
Re:In Praise of PostgreSQL by pcr910303 on Thursday August 05, 2021 @12:35PM (#28076036)
SQLite is an exceptional piece of software as well…

It’s lightweight, reliable, knows what it’s tasked for, does exactly wat it does, and easy to extend. I personally reach SQLite first in so many cases, including web backends. That the DB is a file that’s literally a cp away to backup is super-useful in development and debugging.

Really the only complaint is that type enforcement is lacking… which I wish I could have said not a big deal, but it turns out it is. I wish I had a embedded DB that’s as reliable and trustful, lightful as SQLite, but with types enforced. :-(

Re:In Praise of PostgreSQL by open-source-ux on Thursday August 05, 2021 @01:25PM (#28076791)
It's worth taking a look at the Firebird relational database.

Firebird can be used as an embedded DB or an client/server DB. It supports a wide variety of data types, is open source and cross-platform too.

It's a database that's rarely discussed here (a mystery why not). It certainly deserves wider attention.

Firebird features: https://firebirdsql.org/en/features/

Re:In Praise of PostgreSQL by kstrauser on Thursday August 05, 2021 @02:25PM (#28077573)
I worked with a company a long time ago that was using Interbase as the backend for a few websites. It had the interesting property that if you were using the command line client to connect to the server, and you used ^Z to pause the client, then the server would hang for all clients until you resumed it.

I know it’s completely unreasonable to judge Firebird today for Interbase 20 years ago, but admit that’s still the first thing that pops to my mind.

Do you feel Firebird offers something SQLite doesn’t?

Re:In Praise of PostgreSQL by open-source-ux on Thursday August 05, 2021 @03:30PM (#28078382)
Nothing beats the nimbleness, simplicity and speed of SQLite, but it is not a client/server database engine (although it is often used for that purpose due to its speed).

Firebird can be used as a proper client/server database engine. It supports static data types and stored procedures (unlike SQLite). It sits somewhere between SQLite and PostgreSQL. So it may be worth evaluating if you don't want the heft of PostgreSQL but need features missing from SQLite.

Re:In Praise of PostgreSQL by zimpenfish on Friday August 06, 2021 @03:40AM (#28084308)
> embedded DB

Sounds like it's not quite as embedded as SQLite? Seems like it just smushes the server into your app and spins that up from within. Also it only seems to be properly "embedded" on Windows (no macOS support and Linux is a bit weird?)

> Finally, you can't just ship libfbembed.so with your application and use it to connect to local databases. Under Linux, you always need a properly installed server, be it Classic or Super.

Re:In Praise of PostgreSQL by password4321 on Thursday August 05, 2021 @12:53PM (#28076317)
Does https://duckdb.org enforce types?
Re:In Praise of PostgreSQL by names_are_hard on Thursday August 05, 2021 @01:03PM (#28076473)
Agreed on all points. I'd also add that I miss table-valued functions in sqlite.
Re:In Praise of PostgreSQL by DemocracyFTW on Thursday August 05, 2021 @06:47PM (#28081056)
you can write your own table-valued, aggregate and window functions when you use better-sqlite3 (see https://github.com/JoshuaWise/better-sqlite3/blob/master/doc... see Database#function(), Database#aggregate(), Database#table()) in JavaScript.
Re:In Praise of PostgreSQL by names_are_hard on Thursday August 12, 2021 @03:47PM (#28160620)
This is really cool, thanks for pointing me to that. I'm still probably going to migrate to postgres because I'd like the functions to exist in the db and not just in code, so I can use them in ad-hoc queries.

But this is worth considering as an option.

Re:In Praise of PostgreSQL by suprfsat on Thursday August 05, 2021 @02:35PM (#28077706)
Javascript does exactly wat it does but I don't see anybody rushing to praise it