четвер, 21 квітня 2016 р.

Postgres useful features


To copy values from one db to another db

pg_dump -h <SRC_HOSTNAME> -U <user> -t table_to_copy source_db | psql -h <DST_HOSTNAME> -U <user> -d target_db

четвер, 14 квітня 2016 р.

My experience in DBMS structure creation PostgreSQL+Liquibase (constantly updated)

1. Create auto-incremental id field. It is suitable for inserting a new values.

 <addAutoIncrement tableName="TABLENAME" columnName="ID"/>

2. Сonsider to create field as NOT NULL if applicable