r/programming • • Nov 16 '14

PostgreSQL vs. MS SQL Server - A comparison of two relational databases from the point of view of a data analyst

http://www.pg-versus-ms.com/
171 Upvotes

321 comments sorted by

View all comments

Show parent comments

2

u/rmxz Nov 17 '14

That's not what a compiled stored procedure is for SQL Server

Sincerely curious - what's the difference?

Looks to me that in both cases you can define a function/procedure/whatever-your-dialect-wants-to-call-code-that-runs-in-the-database that gets compiled to native code so it's faster when run often.

1

u/[deleted] Nov 17 '14

[removed] — view removed comment

1

u/rmxz Nov 17 '14

Sounds like the closest analogy would then be a C extension for Postgres ( http://www.postgresql.org/docs/9.4/static/sql-createextension.html )?

Such extensions are (often) C shared library that exposes functions, data types, operators, etc to SQL. PostGIS is probably the most famous example -- which pretty much exposes all of the GDAL C++ library ( http://www.gdal.org/ ) as SQL and adds geospatial data types.