Add the type oid to the column schema on PostgreSQL

This can be used to take a column and string and cast the
string to a database type, the same way the native postgres
adapter does when retrieving the column.
Make all postgres adapters store conversion procs

Instead of just being used by the native postgres adapter, now
all adapters that connect to PostgreSQL have conversion procs.
This makes it easier for the pg_* extensions to work with any
of the adapters.

In the native postgres adapter, instead of copying connection
procs on first connection, do so upon initialization.  This
is less racy, more correct, and results in simpler code.  Note
that it won't actually check out a connection upon
initialization unless it needs one to do a name->oid mapping.

Cleanup some shared initialization code by adding an
initialize_postgres_adapter private method.

Change the private get_conversion_procs method to no
longer accept an argument, so modify callers appropriately.

While here, update the mock postgres adapter to setup sqls
data structure early, so that it works with these changes.
Also, have it implement the bound_variable_arg method, so
some postgres specs don't need to add it manually.

Also, rename convertor to converter in pg_array spec and
some rdoc.
Add pg_typecast_on_load plugin for converting advanced PostgreSQL types on load the {jdbc,do,swift}/postgres adapters

This allows the do/postgres, swift/postgres, and jdbc/postgres
adapters to handle the custom types similarly to how the
native postgres adapters handles them.  Currently, the typecast
on load plugin could be used, but that will soon not be possible
for some types.
Don't allow model typecasting from string to postgres array, hstore, or composite types

User input for typecasting is very unlikely to come in a String
in PostgreSQL output format. The only reason a string was allowed
before was to allow the do/postgres, swift/postgres, and
jdbc/postgres adapters to work with the typecast_on_load
plugin.  Now that the pg_typecast_on_load plugin has been added,
this feature is no longer needed and should be removed.

The parsers for these types were written expecting it only to
be called with database output.  However, typecasting is called
with user input.  I don't know of any vulnerabilities in the
parsers, but as they weren't designed with security in mind,
it's better to protect them from user input.  At the very least,
the pg_array parser without sequel_pg is quite slow, so for large
input it's an easy DoS target.

Other types such as interval, inet, range, and json have much
simpler parsers that shouldn't pose any security issues, plus it's
conceivable that input could come in the form of a string for
those types.
Reuse existing timestamp conversion proc

Instead of creating a new one via a method, reuse the existing one.
This saves on memory and is more correct in the case a custom
conversion proc for timestamps is used.
When loading multiple pg_* extensions via Database#extension, only reset the conversion procs once

Before, the conversion procs would be reset for every extension,
instead of only once.  This wasn't usually a big deal before,
but with pg_row and pg_hstore, reseting the conversion procs
requires database access, so it's best to eliminate the
redundant queries.
Don't do a runtime check for conversion proc for string types in pg_row

If a member of a composite type is a string type, then don't setup
a runtime check for a conversion proc, since that could hurt
performance.
Add Model#to_hash as an alias to Model#values

Since Sequel::Model is designed to be a wrapper around Hash that
adds some behavior, I think it makes sense to have a to_hash method.
Don't load schema, hook_class_methods, or validation_class_methods by default in specs

Since they were split from the base model support in Sequel 3.0,
the plugin specs loaded them globally into the Sequel::Model
class.  That's a bad idea, as it could hide dependencies in the
specs.  Make the specs behave better by only adding the plugin
to a Sequel::Model subclass.
Add info on internationalization to validation_helpers RDoc

Most of this code comes from mmontossi on IRC, thanks to him
for sharing.
Add pg_typecast_on_load plugin to website
Support an output identifier method in the swift adapter

This probably hurts performance, but it's the only way to get
output identifiers working.  Since we're already taking a hit
since we started handling blobs correctly, we might as well
support output identifiers.
Add :textsize option to tinytds adapter to override the default TEXTSIZE (Fixes #525)

The default TEXTSIZE setting on tinytds is about 64k, which is
pretty small.  While you can override the setting in freetds.conf,
for some users (Windows users using a binary gem), that might not
be the easiest change to make.  Allow a :textsize option to manual
set the setting for each connection.

While here, initialize the mssql unicode strings setting on
initialization instead of on connection.

Add a spec that tests >64k of data, and switch some test tables
to use generic types instead of specific types.
The swift adapters now require swift-db-* instead of swift itself (Fixes #526)

This is a squashed commit of Pull Request 526, along with some
local changes by me, including:

* Using :pass instead of :password so that connections that require
  passwords work.

* Requiring the swift-db adapter instead the subadapter instead
  of the main adapter proc.

* Adding appropriate guards to the specs.  Currently, hstore
  ? operators are broken on swift/postgres just like on do/postgres.
  Also, swift/sqlite is not completely stable, so add guards for
  the specs that cause it to crash (see
  https://github.com/deepfryed/swift-db-sqlite3/issues/1 for details).

One good thing about this change is that with the swift-db-*
adapters, you only need to install the related gem, you don't need
to install dbic++.
Make swift/postgres adapter work with hstore, requires swift-db-postgres 0.2.0+

This sets the native_bind_format setting which causes
swift-db-postgres not to do the ? -> $n conversion that breaks
the hstore ? operator.
Remove some spec guards related to swift

Some of the swift/sqlite specific ones were added recently to
work around memory issues in swift-db-sqlite3, which have been
fixed in version 0.1.2.  Others also appear to be run correctly
and should be enabled.
MySql types 'double(x,x)', 'double(x,x) unsigned' support added.
Add a > 0 check for double(x, y) unsigned

This is already done for unsigned integers and bignums, so it makes
sense to do so for double as well.
Bump version to 3.38.0
Recognize MySQL set type and default value (Fixes #529)

While here, refactor column_schema_to_ruby_default to not check
for database types.  Instead, override the method and call
super inside the shared adapters.

Instead of supporting set for all databases, only add it to the
shared mysql adapter.  Likewise, since interval is only supported
on PostgreSQL, move support for it to the shared postgres adapter.

For simplicity, still recognize the :set and :interval type symbols
in the global code in order to return the default values as a ruby
string, though that may be refactored out to the adapters later.

While here, do some minor cleaning up of the postgres adapter specs.