Tags » PostgreSQL

Docker Tips n' Tricks for Devs - #0001 - 3 Second to Postgresql

The easiest implementation of a docker container with Postgresql that I’ve found recently allows the following commands to pull and run a Postgresql server for you. 63 more words


Using psycopg2 with PostgreSQL

I had been using MySql my whole life until recently I got my hand dirty on PostgreSQL in one of projects. I must tell, switching to PostgreSQL has been very easy. 422 more words


Rails 4: gem install pg (when using the Postgresql App on OS X)

If you are getting a build error from Gem when trying to install the PostgreSQL gem called ‘pg’ and you are using the PostgreSQL App instead of installing PostgreSQL via Brew or some other method, it is because Gem cannot find the PostgreSQL config in the standard locations. 140 more words


Speed up when execute DML

Sometimes, when i need to speed up some DML transaction, I usually defer constraints of database, I think it can help the transaction completed with more quickly.



create user or role

Confuse with create database user, just run this command:

createuser –createdb –username postgres –no-createrole –pwprompt test


How to know the postgresql data directory

If you want to know, the path of postgresql’s data, just login to psql cli, and run this command:

    SHOW data_directory;

and then you can get the path.


Automating PostgreSQl Installation Using Shell Script

This post taught you how to install PostgreSQL Database on Linux using source code. That approach is good when number of servers is less. But what if it is to be installed on a large number of servers? 355 more words