4 ms·
If you want your application to be portable, don't use this feature.
by cosmotic 7y ago
If you want your application to be portable, don't use this feature.
- irrational 7y agoDo you mean portable as in able to run on different databases? Your application would have to be fairly simple to achieve that goal. We moved an application from Oracle to Postgres. It took about 2 years to complete.
- cosmotic 7y agoIf you start out minimizing proprietary features, its a lot easier to do. Oracle is filled with proprietary features so I'm not surprised it was a lot of work. My application is pretty simple and I converted from mysql to postgres in an afternoon.
- cosmotic 7y agoMany applications are built on ORMs which are pretty portable. About the only thing I regularly depend on that is proprietary per RDBMS is "last insert autoincrement id" since it's not part of the SQL standard. Binary blobs is another big one.
- _jal 7y agoThis advice grew out of the days when database platforms cost enormous amounts of money. It is still as true as it ever was, but since then the biggest pressure that lead to it no longer applies. Back before PG and others were viable competitors to the big commercial databases, about the only leverage customers had against aggressive sales people was the threat to switch to a competitor. So people would preserve that as a credible threat by not using proprietary SQL extensions. No vampiric salesdroid from Postgres is going to knock on your door demanding 8 figures. Now, there may be other reasons you want to switch away from it, or you may want to support a variety of DBs in whatever you're building, or some other reason. So it is good to be aware of. But shying away from SQL extensions is usually no longer a matter of budgetary apocalypse.
- munk-a 7y agoAt my first job I worked on a program that supported MySQL, MSSQL and Postgres[1]. Now I work on a project that's Postgres only and, honestly, I don't see the need to put any effort into SQL neutrality these days. 1. Only because I hacked it in during my free-time since it is such a trivial dialect to support.
- notatoad 7y agois anybody out there actually writing portable sql?
- cosmotic 7y agoI am. Also anyone else using an ORM likely is.