Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Changeset [0c81dd0a1f6430ee1cc8ccfac032e5e30ed4ad90] by David Cato

Revision 0c81dd0a1f6430ee1cc8ccfac032e5e30ed4ad90, committed by David Cato · October 17th, 2009 @ 03:10 AM

Don't extract the default column value twice

The column default setting, not its value, should be used when creating
a new PostgreSQLColumn because PostgreSQLColumn#initialize calls
extract_value_from_default. When called on an already extracted default
value, the result is a nil value being used instead of the actual default
value defined in the DDL, thus leading to INSERT errors when the column
has a not-NULL constraint and no value is specifed when the record is
created.
http://github.com/nofxx/postgis_adapter/commit/0c81dd0a1f6430ee1cc8...

3 changed files

  • M lib/postgis_adapter.rb
  • M spec/postgis_adapter_spec.rb
  • M spec/spec_helper.rb