Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You implement any custom logic in PostgreSQL mechanisms (permissions, triggers, constraints, views, stored procedures etc).


...and be locked in for life, joy.


> ...and be locked in for life, joy.

"The argument that you don't want to write any code that locks you to a database is some stunning lack of awareness, as you decide to lock yourself into the tsunami of unpredictability that is web frameworks to ward off the evil of being locked into a 20 year database product built on some pretty sound theoretical foundations."

https://news.ycombinator.com/item?id=9928321


Is it a common circumstance to completely switch your data layer without having a massive rewrite of your application? Do people frequently flip from pg to Oracle, or from SQL Server to MongoDB, and it was super-easy because that layer was abstracted?


Not frequently, but yes. Was forced to move from Oracle to Postgres, not that I mind Postgres. Very little software changes were required to get up and running. If everything was in views or stored procedures the change would have taken months instead of weeks.


On the other hand, I had to write for some software that supported both Oracle and Postgres (many deployments, new using Postgres and old migrating over time to Postgres) and it was a chore. All tests had to be run in both, SQL was 'same but different' with different types, and for perf reasons there was tonnes of hinting, which obviously pg ignores so overall performance was very different.


How are you not locked in by Ruby on Rails if you chose to use it for your business logic? With the disadvantage of it being really slow.


The classic fear of lock-in was vendor lock-in.

Does Oracle or Sybase own Postgres? Nope.

There's nobody with a legal hand on your throat.


I have presided over a couple of to-PostgreSQL migrations but I've only heard of one away-from-PostgreSQL migration, and it was Skype when MS bought it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: