One of the things we love most about PostgreSQL is the ease with which one can define new aggregate functions with even a language as succinct as SQL. Normally when we have needed a median function, we've just used the built-in median function in PL/R as we briefly demonstrated in Language Architecture in PostgreSQL.
Partially. The text is inserted, but the warning is still generated.
I found a discussion that indicated the text needed to be preceded with 'E', as such:
insert into EscapeTest (text) values (E'This is the first part \n And this is the second');
This suppressed the warning, but the text was still not being returned correctly. When I added the additional slash as Michael suggested, it worked.
insert into EscapeTest (text) values (E'This is the first part \\n And this is the second');
Tuning your PostgreSQL database is somewhat of a black art. While documentation does exist on the topic, many people still find it hard to get all the power out of their system. This article aims to help demystify PostgreSQL database performance tuning.
First in short - clustering on an index forces the physical ordering of the data to be the same as the index order of the index chosen. Since you can have only one physical order of a table, you can have only one clustered index per table and should carefully pick which index you will use to cluster on or if you even want to cluster. Unlike Microsoft SQL Server, clustering on an index in PostgreSQL does not maintain that order. You have to reapply the CLUSTER process to maintain the order. Clustering helps by reducing page seeks. Once an index search is done and found, pulling out the data on the same page is vastly faster since once you find the start point all successive data nearby is easy picking.
Slony-I is a "master to multiple slaves" replication system for PostgreSQL supporting cascading (e.g. - a node can feed another node which feeds another node...) and failover.
The big picture for the development of Slony-I is that it is a master-slave replication system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of slave systems.
Slony-I is a system designed for use at data centers and backup sites, where the normal mode of operation is that all nodes are available.
A fairly extensive "admin guide" comprising material in the Git tree may be found here. There is also a local copy.
The original design document is available here.
Multi-Master allows for load-balancing and fail over type high availabilty. PGCluster 1.0 started with this, 1.1 added large-object replication and 1.3 is an nice refinement. The documentation for this package is well done and easy to understand.