FIX: PostgreSQL deadlock sqlstate

In PostgreSQL, when the deadlock error occurs, Sequel::DatabaseError is
raised instead of Sequel::SerializationFailure.
Because the sqlstate of deadlock is '40P01' in PostgreSQL. It is not '40001'.
Fix spelling error
Update CHANGELOG
Merge branch 'patch-1' of https://github.com/tmaier/sequel
Add support for conditions on triggers in postgres
Avoid false positive cache hits when using STI.
Minor cleanups for PostgreSQL create_trigger :when option

Add method documentation for it, and simplify the handling.  Also,
only test the behavior if the PostgreSQL version being tested
supports it.
Merge branch 'master' of https://github.com/pete/sequel
Fix specs to run on ruby 1.8, update CHANGELOG
Fix regression in class_table_inheritance plugin when lazily loading column in middle table

This regression happened when you have a hierarchy such as:

 class A < Sequel::Model; plugin :class_table_inheritance; end
 class B < A; end
 class C < B; end

And you retrieve a partially loaded instance of the subclass
via the parent class:

  c = C.create
  c = A[c.id]

If you try to call a column method for a column contained in B's
table:

  c.column_in_table_b

You would get an error because it qualified the column with C's
table instead of B's table.

To fix this, options need to be added to lazy attributes getter
method creator so that you can define the dataset and qualifier
to use inside the getter.

class_table_inheritance can then use the options to setup the
lazy attributes getter properly.
Document passing a Hash parameter to on_duplicate_key_update
. "with with" -> "with"
Add search_path documentation for postgresql driver options
Add some more detail to the search_path documentation