These pages about different languages / apis / best practices were mostly jotted down quckily and rarely corrected afterwards.
The languages / apis / best practices may have changed over time (e.g. the facebook api being a prime example), so what was documented as a good way to do something at the time might be outdated when you read it (some pages here are over 15 years old).
Just as a reminder.
Postgresql developer notes regarding database
developer notes for the Postgres database Postgres
How to make Postgres reload pg_hba.conf
Import data from CSV file into tableAs superuser
Export data to CSV file from table/viewAs superuser
From a select query
Dump and restore a db in postgres
explain analyzeand after that the select statement to get an analyze of how much time it take time etc.
Grant superuser to a useralter user [username] with superuser;
Kill a process
select pg_terminate_backend(9423); pg_terminate_backend ---------------------- t (1 row) pond91=# \q pg_cancel_backend() doesnt seem to do anything
Find all constraintshttp://stackoverflow.com/questions/16830740/list-constraints-for-all-tables-with-different-owners-in-postgresql
Find the function names in postgresql
SELECT p.proname FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid WHERE n.nspname = 'public'
Create user and databasecreate user scott with password 'somePassword';
create database someName with owner scott template template0 encoding 'utf8';
Change varchar sizehttp://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data
See definition of trigger (or other stuff)
See what is allocated on a tablespace
select relname from pg_class where reltablespace=(select oid from pg_tablespace where spcname='theTableSpaceName');
More programming related pages