PostgreSQL tips and tricks
PostgreSQL 9 pgcrypto Debian (November 4, 2013)
New instructions for installing pgcrypto in PostgreSQL 9...
New instructions for installing pgcrypto in PostgreSQL 9...
Postgresql increase SHMMAX with sysctl (June 28, 2013)
How do you configure the kernel SHMMAX parameter to give Postgresql more shared memory...
How do you configure the kernel SHMMAX parameter to give Postgresql more shared memory...
Postgresql add cascade to existing foreign key constraint (March 8, 2013)
If you created a foreign key constraint but forgot to add cascading updates here is how to fix it...
If you created a foreign key constraint but forgot to add cascading updates here is how to fix it...
PostgreSQL output query result to file (January 28, 2013)
How do you dump the results of a SELECT query to a file?...
How do you dump the results of a SELECT query to a file?...
PostgreSQL /var/lib/postgresql/8.4/main/pg_xlog filling up with WAL files (June 22, 2012)
If your postgres pg_xlog directory is filling up with 16777216 byte WAL files then your archive_command is failing...
If your postgres pg_xlog directory is filling up with 16777216 byte WAL files then your archive_command is failing...
PostgreSQL drop unique constraint (May 29, 2012)
How to you drop a unique row constraint in PostgreSQL?...
How to you drop a unique row constraint in PostgreSQL?...
PostgreSQL DROP NULL constraint on COLUMN (April 5, 2012)
How do you drop a NOT NULL constraint on a database column in PostgreSQL?...
How do you drop a NOT NULL constraint on a database column in PostgreSQL?...
SQL get MAX value or NULL (LEFT JOIN example) (March 5, 2012)
SQL example to get the MAX value from the right hand table or NULL if there is no matching row...
SQL example to get the MAX value from the right hand table or NULL if there is no matching row...
Ubuntu sudo postgres createdb (January 9, 2012)
How do you sudo to a specific user in Ubuntu to create a new Postgres database?...
How do you sudo to a specific user in Ubuntu to create a new Postgres database?...
Select unique values in postgres (November 18, 2011)
How do you select unique values from a column in postgresql?...
How do you select unique values from a column in postgresql?...
Load specific columns from CSV file into PostgreSQL (November 9, 2011)
How do I import data from specific columns into a PostgreSQL table?...
How do I import data from specific columns into a PostgreSQL table?...
Postgres copy table structure inside database without data (November 3, 2011)
How do you copy a table structure inside a database in PostgreSQL?...
How do you copy a table structure inside a database in PostgreSQL?...
PostgreSQL config, data, log files on Debian (October 28, 2011)
Where does PostgreSQL store the data and config files like postgresql.conf, pg_hba.conf on Debian...
Where does PostgreSQL store the data and config files like postgresql.conf, pg_hba.conf on Debian...
PostgreSQL Debian make a baseline backup for PITR (October 28, 2011)
How to make a baseline backup for Point In Time Recovery (PITR) in PostgreSQL in Debian...
How to make a baseline backup for Point In Time Recovery (PITR) in PostgreSQL in Debian...
FATAL: sorry, too many clients already (PostgreSQL) (September 26, 2011)
Getting a 'too many clients already' error from your database driver when opening a connection? Use this Java design template to ensure you are not leaking resources....
Getting a 'too many clients already' error from your database driver when opening a connection? Use this Java design template to ensure you are not leaking resources....
Run PostgreSQL queries from the command line and export data (July 22, 2011)
Need to dump some data from your database into a file but want to use SQL to intelligently select what you export? Here is how to run SQL from the command line using the psql tool...
Need to dump some data from your database into a file but want to use SQL to intelligently select what you export? Here is how to run SQL from the command line using the psql tool...
PostgreSQL convert BIGINT to date (July 19, 2011)
If you are storing your timestamp data with millisecond accuracy in a PostgreSQL BIGINT column then you can use the following SQL to retrieve the value as a date....
If you are storing your timestamp data with millisecond accuracy in a PostgreSQL BIGINT column then you can use the following SQL to retrieve the value as a date....
Get SEDOL from ISIN using SQL (Postgres) (July 19, 2011)
The SEDOL identifier for UK stocks is a substring of the ISIN code. Here is how to extract it using a PostgreSQL SELECT statement....
The SEDOL identifier for UK stocks is a substring of the ISIN code. Here is how to extract it using a PostgreSQL SELECT statement....
Find biggest tables in postgres (July 4, 2011)
Find the tables in your database which occupy the most disk space....
Find the tables in your database which occupy the most disk space....
Postgres list databases (May 25, 2011)
Here is how to list your databases in postgres from the command line (using psql) and from within psql....
Here is how to list your databases in postgres from the command line (using psql) and from within psql....
Install pgcrypto for Postgres encryption in Debian Lenny (May 17, 2011)
If you need database level encryption in postgresql you can add it easily using the functions in the pgcrypto contrib module....
If you need database level encryption in postgresql you can add it easily using the functions in the pgcrypto contrib module....
Postgres invalid byte sequence for encoding UTF8 (May 16, 2011)
Trying to restore a postgres database dump taken from an old version of postgresql? Your database might not be in UTF8 format and might be in an older format such as SQL_ASCII. Here is how to create y...
Trying to restore a postgres database dump taken from an old version of postgresql? Your database might not be in UTF8 format and might be in an older format such as SQL_ASCII. Here is how to create y...
Create and export PGP keys for Postgresql (May 16, 2011)
Here is how to generate the PGP public and private keys needed for encrypting/decrypting column data in postgres using the pgp_pub_encrypt and pgp_pub_decrypt functions from pgcrypto....
Here is how to generate the PGP public and private keys needed for encrypting/decrypting column data in postgres using the pgp_pub_encrypt and pgp_pub_decrypt functions from pgcrypto....
Postgres list user-defined stored procedures (May 12, 2011)
Need to get a list of stored procedures but don't want to wade through all of the built in ones? Use this query to get them....
Need to get a list of stored procedures but don't want to wade through all of the built in ones? Use this query to get them....
Postgres dump database schema with or without data (March 28, 2011)
Need to copy the database schema (table structure) with or without the table data from an existing postgres database?...
Need to copy the database schema (table structure) with or without the table data from an existing postgres database?...
Postgres server to server database copy performance boost (February 22, 2011)
How to copy a database from one server to another over a network....
How to copy a database from one server to another over a network....
Ask me about
AdSense Android ant Apache Applet Artigo C++ CI codec console CSS Debian DemoScene deployJava.js diff DIY Eclipse Excel fdisk find Firefox FixPC Flash fuse GC git GPG grep HotSpot hsdis HTML Icedove icedove Iceweasel ImageMagick iOS iPhone iSCSI ISO JarScan Java JavaFX JavaScript JCrete JDBC JDK Jenkins Jessie JIT JITWatch JVM lambdas lame Linux linux low latency LVM Mac MacPorts maven Microsoft mkfs mp3 MySQL Networking networking NFS Obj-C OpenJDK OpenJFX openSSL openssl optimisation OSX Patterns PHP PIX PostgreSQL powersaving PS3 Puzzle qmail Raspberry Pi RaspberryPi Safari samba Samba Scala scp scponly SEO ssh sshfs stunnel svn SWT sysctl syslog-ng tcpkill Thunderbird tmpfs Tomcat tripwire Ubuntu Unity UTF-8 vi VirtualBox website Websites wget Windows Windows 8 Word Xcode xen ZTE Blade