I'm currently building an application which makes heavy use of JSONB in PostgreSQL. After a while of searching I was unable to find any solution to people's questions about distinct JSONB keys across an entire table. Here are my findings and I hope it helps someone else.
Today, I attended the workshops leading up to the MongoDB UK event and learned so much from the amazing solutions experts over at 10gen. I can't wait to apply everything I learned such as replica sets, sharding and forward planned Schema Design. I say Schema Deisgn, but since Mongo is a Schema-less database I actually mean an implied data structure on how to highly optimize applications for different use cases.
Here is a small script I whipped up while I was bored in the Travelodge waiting for #MongoDBUK. It's basically a drop in script to make sure MongoDB is installed with the default settings, and up to date. Very simple, but it saves running the commands manually each time. I may update this in the future when I find a better way to check if a key is already added before always inserting it