yum install postgresql.x86_64 postgresql-docs.x86_64 postgresql-plperl.x86_64 postgresql-server.x86_64 pgadmin3.x86_64
postgresql-setup initdb
service postgresql start
/var/lib/pgsql/data/pg_hba.conf
* md5 – allow authentication using password
* ident – authentication as system user
/var/lib/pgsql/data/postgresql.conf
su - postgres
createuser hrabal
psql: ALTER USER hrabal with password 'heslo';
/var/lib/pgsql/data/pg_log/postgresql-Thu.log
CREATE DATABASE cia_news_production WITH OWNER "hrabal" ENCODING 'UTF8' LC_COLLATE 'cs_CZ.UTF-8' LC_CTYPE = 'cs_CZ.UTF-8';
/usr/share/phpPgAdmin/conf/config.inc.php
/etc/httpd/conf.d/phpPgAdmin.conf
http://localhost/phpPgAdmin/
psql -h localhost -U hrabal -W -d cia_news_production
\copy (Select * From foo) To '/tmp/test.csv' With CSV;
select to_char(published_at, 'YYYY-MM')
SET search_path TO cia;
select * from cia_deleted_records where 1=0;
select * from cia.cia_deleted_records where 1=0;
show tables: \dt
show tables: \dt cia.*
show columns: \d table
\timing
pg_dump -h 85.239.227.27 -U ci000303 ci000303 -t cia.monitoring_justice -f out.sql