Postgre, MySQL and Oracle all have severely limited stored procedure capabilities compared to SQL Server. Postgre can't even return multiple result sets from a procedure or use transactions.
Postgre, MySQL and Oracle all have severely limited stored procedure capabilities compared to SQL Server. Postgre can't even return multiple result sets from a procedure or use transactions.
Some bits in MS-SQL are somewhat painful... powerful, but painful.. dealing with XML types is particularly nasty. I can't really compare that on PostgreSQL's side... What gets me with MS-SQL is that I can setup and run with very little need for digging into advanced configuration options. Replication is relatively simple, and easy to do (though expensive).
On the other side, having played with PostgreSQL + plv8, it's NICE ... if I could get a full node environment inside PostgreSQL (node modules as function libries), that would be amazing.
SELECT Id, Name FROM dbo.AppType;
SELECT Id, AppTypeId, Name FROM dbo.App;
With pgsql you have to use `RETURN QUERY` and both tables have to have the same column definition. If you want to do this in Postgre, you have to resort to using a completely different programming language such as Javascript via plv8 as you mentioned.The code to do the above in Javascript is not as straight forward. All of a sudden, you have to know a completely new object model which you then use to prepare and execute statements or control cursors. The code to return multiple results is no longer straight-forward SQL-like code...it's Javascript.
Other languages can be executed in the MSSQL process too though, if that route is preferential. .NET languages are the standard there, but C++ can be used and even Node via Edge.js.
var _ = require('lodash');
but it works. Part of the reason is plv8 is a trusted language, meaning it cannot read code from the file system. Basically, the libraries are loaded as text into a table, and then evaluated by v8 using the library loader. Someone could make a gulp task to make that a quick command line tool if they did it often enough....