create user <username> createdb createuser;
alter user <username> with password '<password>';
ALTER TABLE <table> ALTER COLUMN <column> TYPE <new_type>;
BEGIN; ALTER TABLE <table> ADD COLUMN <new_column> <new_type>; UPDATE <table> SET <new_column> = CAST(<old_column> AS <new_type>); ALTER TABLE <table> DROP COLUMN <old_column>; COMMIT;
ALTER TABLE <table> ADD CONSTRAINT table_column_key UNIQUE (<column>);
ALTER TABLE <table> DROP CONSTRAINT <constraint>;
In postgresql.conf:
log_statement = 'all'
In postgresql.conf:
stats_command_string = true
Then look at table pg_stat_activity
Example:
UPDATE region SET code='0'||id;
Example:
SELECT NEXTVAL('hibernate_sequence');
/etc/postgresql/8.1
tail /var/log/postgresql/postgresql-8.1-main.log
In /etc/postgresql/8.1/main/pg_hba.conf:
host all all 206.12.30.0 255.255.255.0 md5
In /etc/postgresql/8.1/main/postgresql.conf:
listen_addresses = '*'