4 ms·
(Ozgun from Citus Data) It's Postgres' Extension APIs. They enable you to extend, cooperate with, or override any database submodule's behavior without forking
by ozgune 11y ago
(Ozgun from Citus Data)
It's Postgres' Extension APIs. They enable you to extend, cooperate with, or override any database submodule's behavior without forking the database: https://goo.gl/rr2EIm https://goo.gl/rr2EIm
As an example, let's say you leveraged planner hooks to parallelize PostgreSQL queries. When a new feature such as JSONB gets checked into Postgres, it becomes immediately available for parallel querying.
To my knowledge, no other database provides the means to extend the database to such an extent. These APIs became official in PG 9.0, and two example links from the PostgreSQL documentation are:
http://www.postgresql.org/docs/9.4/static/extend.html http://www.postgresql.org/docs/9.4/static/extend.html
http://www.postgresql.org/docs/9.4/static/spi.html http://www.postgresql.org/docs/9.4/static/spi.html
- mercurial 11y agoThis doesn't really answer my question. I'm not asking "how can you turn PG into a distributed database", I'm asking "what do I get with that that I don't get with, eg, Cassandra"?
- tracker1 11y agoStructured Query Language ... that's the biggest thing you get. Also database resolved relational data. It also allows you to present said information from other stores through a well defined interface, such as via stored proceedures that can be locked down via login/identity/application and other features typically in SQL, while being able to act as a gateway for more optimized data stores for specific types of data. Not to mention that JSON data in pgsql has gotten pretty good... I think with plv8 it gets event better. Where I think pg falls is in terms of replica sets, hot failover and automated recovery options which many nosql servers give you in the box. With PG you pretty much have to pay for a decent HA solution. That said, I honestly really like document stores, and RethinkDB as an example offers some of the relational features of a typical SQL database while being mainly available as a document store.
- threeseed 11y agoYou can get SQL over Cassandra or almost everything other database (even MongoDB) via Spark. And CQLSH is SQL-like at least. And personally I have always thought putting business logic in stored procedures is a truly dumb idea. You forever lock yourself to that database and there is always a point that you can exceed its capabilities and need to implement functionality in the application layer anyway.
- qaqy 11y agoThere is thins annoying thing called security with such things as trust boundaries etc. So if you are creating a mildly secure web app the only permission your web apps db user has is to execute a subset of stored procedures and that is it.
- threeseed 11y agoI guess you better let everyone know that their web platform isn't secure unless they are using a SQL database with stored procedures. Which would make PSN, Steam, iCloud, Office365, Gmail, Facebook, Twitter all insecure right ? Generally if you have exposed your db credentials it's because something has gone very wrong i.e. your entire host has been compromised in which case stored procedures aren't going to save you.
- ozgune 11y agoI think it's the extent of SQL coverage. As an example, PostgreSQL covers all join types (inner, outer, anti, lateral) that I can think of. Postgres has been building its SQL coverage for over a decade, and compares favorably to others databases: https://news.ycombinator.com/item?id=9018129 https://news.ycombinator.com/item?id=9018129
- mercurial 11y agoWell, of course it does, but "join" in a distributed database is notoriously different (and often not present at all) from "join" in a non-distributed scenario, so this doesn't make it a strong argument for Postgres.