4 ms·
postgres is really thinking outside the SQL box and I love it. JSON support was great and Javascript fits in with it. Now how about support for other languages
by greenlakejake 13y ago
postgres is really thinking outside the SQL box and I love it. JSON support was great and Javascript fits in with it. Now how about support for other languages like Python/Ruby/Lua?
- smilliken 13y agoPython has been available since v8.4: http://www.postgresql.org/docs/9.2/static/plpython.html http://www.postgresql.org/docs/9.2/static/plpython.html.
- craigkerstiens 13y agoPM of Heroku Postgres here. Part of choosing JavaScript and in particular V8 was that its a fully sandboxed language. Other languages while also very powerful can have various security risks that come along with them. In the future we may support additional languages and if there's particular ones please feel free to drop us a line at postgres@heroku.com and let us know which ones you'd like and why.
- Goranek 13y agoany chance of supporting fdw(foreign data wrappers)?
- craigkerstiens 13y agoWe're very excited to see FDWs evolve. In the future theres some chance we will support them, but no immediate timeline available.
- Goranek 13y agopostgres 9.3 is bringing writes to FDW and this will be really interesting
- greenlakejake 13y agoThanks for the response. OK, I buy the security issue. My Javascript skills - once pretty good - are bit rusty so Ill have to brush up on it. But I do have an ides for a project and will download postgres later today.
- jacques_chester 13y agoPL/Lua can be installed in either trusted and untrusted versions. http://pllua.projects.pgfoundry.org/ http://pllua.projects.pgfoundry.org/
- dragonwriter 13y ago> postgres is really thinking outside the SQL box and I love it. JSON support was great and Javascript fits in with it. Postgres is awesome, but the JavaScript support from PL/V8 is a third-party extension, not a core database feature.
- pvh 13y agoPostgres is an extensible database. That's the beauty of the project. I don't think you'd say "well, Ruby is awesome but web application development support comes from a third-party project, not the standard library."
- dragonwriter 13y ago> Postgres is an extensible database. That's the beauty of the project. I agree, I just thought from the reference to JSON (which is a core database feature) that PL/v8 was being incorrectly attributed the postgres team directly. > I don't think you'd say "well, Ruby is awesome but web application development support comes from a third-party project, not the standard library." I might if someone pointed to Rails with a comment that implied it was a credit to the Ruby team and a next step to a stdlib feature.
- pvh 13y agoThat's fair enough. It's worth noting that Hitoshi Harada, the original author, is a long time contributor to the core project.
- rosser 13y agoProcedural language handlers exist in the core distribution for Perl, Python, Tcl, and PostgreSQL's own procedural language, PL/pgSQL. Third party handlers exist, off the top of my head, for JavaScript (obviously; see TFA), R, Ruby, Scheme and shell. That list probably isn't remotely exhaustive.
- petepete 13y agoJava and C too. To be honest, though, I've never really had much of a use for any language other than pl/pgsql and occasionally pl/r; I try to keep anything too complicated outside of the database.
- skrebbel 13y agoThe languages are, I guess, most useful for people who design their database as a datastore with an API, used by multiple independent clients (a common setup in enterprises). The API typically consists of stored procedures, and normal queries are disallowed for most usernames. Being able to implement such an API in $DECENT_LANGUAGE and not pl/pgsql sounds like an enormous win.
- pjmlp 13y agoExcept that around 1999 it was already possible to write stored procedures in Perl on Oracle. Eventually it was replaced by Java. SQL Server allows for .NET stored procedures, so you could already use something like JScript.NET. I fail to see what you mean by thinking out of the box.
- skrebbel 13y agoWell, at least they're thinking outside MySQL's box.
- brokenparser 13y agoThat's true of pretty much any database.