News for hackers. Stuff that matters.
Re:PostgreSQL is the worlds’ best database by onion2k on Friday April 03, 2020 @10:04AM (#22769219)
the code is not reusable accross different storage layers. So not portable.

In my 23-and-a-bit years of web development I've literally never changed the database engine on a project. Maybe that happens on other people's projects, but it's not something I consider important or even useful really. The notion that you can swap out your database for a different one without changing the application code to take advantage of the db you're moving to is ludicrous. Of course your database code isn't portable.

Websites that used MySQL and Myisam tables with raw SQL statements written as strings in PHP for the first decade of the web is one of the reasons why so many web developers still don't use things like transactions, stored procedures, views, etc. That's a bit of a tragedy. The web would be much better today if everyone had been using Postgres's features from the beginning.

Re:PostgreSQL is the worlds’ best database by BiteCode_dev on Friday April 03, 2020 @12:25PM (#22770869)
If you write a project, you probably won't change the database. But you may add new data layer services such as a cache backend, a search engine with, a secret server, a session store, a permission micro service, etc. They will all interact with permissions and change where you source the data from.

Then there is the case where you don't write a project, but a lib. Or the case where you extract such a lib from a project. In that case, you limit the use case of your lib to your database. Because if you don't change database during your project life time, the users of your lib may start a new project with a different database.

This is why Django ORM allowed such a vibrant ecosystem: not because it allows changing the data base of one project (although it's nice to have and I used it several times), but also because it allow so called "django pluggable apps" to be database independant.

Re:PostgreSQL is the worlds’ best database by Deadron on Friday April 03, 2020 @12:22PM (#22770846)
I have never seen anybody migrate out of PostgreSQL, but I HAVE seen people migrate out of Oracle, and DB2 because they are so expensive its worth the cost to migrate.
Re:PostgreSQL is the worlds’ best database by bernawil on Friday April 03, 2020 @11:55AM (#22770534)

  I've literally never changed the database engine on a project
And some of us do it several times a day because we deploy to prod with Postgres but run testing and CI with SQLite.
Re:PostgreSQL is the worlds’ best database by Matrixik on Friday April 03, 2020 @12:28PM (#22770927)
Me too, until I found how fast Postgres is starting in Docker and for different languages there are now libraries helping you writing tests using Docker containers.
Re:PostgreSQL is the worlds’ best database by patrec on Friday April 03, 2020 @05:11PM (#22773993)
Well, you're doing it wrong. It's easy and fast to run tests against real postgres (takes a fraction of a second to spin up the DB for your tests if you do it right).