This project is archived and is in readonly mode.
Postgres Adapter generates invalid quoted table names
#3465
Rails3 6c59e5a (but has been happening for a couple weeks, since
around the time of the arel merge.)
(PostgreSQL) 8.4.1 pg gem 0.8.0
Gives me the error:
ActiveRecord::StatementInvalid in 'GET /escalation_defintions ssj with authorization before(:all)'
PGError: ERROR: relation "escalation_definitions" does not exist
LINE 4: WHERE a.attrelid = '"escalation_definitions"'::...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"escalation_definitions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:211:in `log'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:539:in `query'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1094:in `column_definitions'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:707:in `columns'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/base.rb:1318:in `columns'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/base.rb:2967:in `attributes_from_column_definition_without_lock'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/locking/optimistic.rb:66:in `attributes_from_column_definition'
/home/rando/development/api/alarm/vendor/gems/dirs/rails/activerecord/lib/active_record/base.rb:2396:in `initialize'
/home/rando/development/api/alarm/vendor/gems/gems/machinist-1.0.5/lib/machinist/active_record.rb:53:in `new'
/home/rando/development/api/alarm/vendor/gems/gems/machinist-1.0.5/lib/machinist/active_record.rb:53:in `make'
./spec/services/escalation_definition_ssj_spec.rb:7:
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_methods.rb:70:in `instance_eval'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_methods.rb:70:in `eval_each_fail_fast'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_methods.rb:70:in `each'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_methods.rb:70:in `eval_each_fail_fast'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_group_hierarchy.rb:13:in `run_before_all'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_group_methods.rb:199:in `run_before_all'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/example/example_group_methods.rb:102:in `run'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/runner/example_group_runner.rb:23:in `run'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/runner/example_group_runner.rb:22:in `each'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/runner/example_group_runner.rb:22:in `run'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/runner/options.rb:151:in `run_examples'
/home/rando/development/api/alarm/vendor/gems/dirs/rspec/lib/spec/runner/command_line.rb:9:in `run'
It works OK on rev cbb70c896cc97077f851c1410a9fee98ca707a36, which is the latest I've tested. Significant changes to the structure of rails apps prevent me from bisecting to find the exact issue.
Reported by Paul Sadauskas (Rando) · November 6th, 2009 @ 12:26 AM
State:
invalid
Milestone:
none
Assigned to:
nobody
Importance:
none
-
Paul Sadauskas (Rando)
Nevermind, it was an issue with the table not existing in the test database. Please close, invalid.