4 ms·
Since postgres has basic json type support now, and PL/Javascript exists, it's only a matter of time until an extension appears that lets you deploy javascript
by metabrew 14y ago
Since postgres has basic json type support now, and PL/Javascript exists, it's only a matter of time until an extension appears that lets you deploy javascript applications directly to the database.
Who needs CouchDB or Node.js when you can just say CREATE EXTENSION 'couchnodegres.js'
- dotborg2 14y agoyet it will not cease comparsions of postgres to mysql
- joevandyk 14y agoOnce the database can start receiving and returning json, then you can treat it as a webservice and not have the client involved in SQL. I think this is huge.
- recuter 14y agoCan you elaborate a little bit on how an architecture like that would look like? I had great hopes for CouchDB once.
- y0ghur7_xxx 14y agoHTML/JS frontend calls simple node server that does nothing but call a stored procedure like spc_handle_request(req_headers, req_body, http_method, ...) stored procedure does simple routing and does something like insert into table (a, b, c) values (to_json(req_body).a, to_json(req_body).b, to_json(req_body).c); or to_json(select * from emp); Time to implement simple crud app: 10 minutes.
- calinet6 14y agoJust FYI, this is already half-true: "With PostgreSQL 9.2, query results can be returned as JSON data types." It also supports the PL/V8 stored procedure format, which is Javascript http://code.google.com/p/plv8js/wiki/PLV8 http://code.google.com/p/plv8js/wiki/PLV8 It's very, very close.