aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-22 08:58:32 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-22 08:58:32 +0000
commit8f89f14fc80af58c1cebb84342cf109aebc858a1 (patch)
treed907fe6f41b0276e4142c147a0e720e1016be71a /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parentcaf546b675ce4771e5ad3349af41c74265b70feb (diff)
downloadrails-8f89f14fc80af58c1cebb84342cf109aebc858a1.tar.gz
rails-8f89f14fc80af58c1cebb84342cf109aebc858a1.tar.bz2
rails-8f89f14fc80af58c1cebb84342cf109aebc858a1.zip
Rollback #5819 since it's compatible with PostgreSQL 8.1 only. References #5819.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 93eb06cac1..a2eaac549e 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -209,7 +209,11 @@ module ActiveRecord
AND t.oid = d.indrelid
AND t.relname = '#{table_name}'
AND a.attrelid = t.oid
- AND a.attnum = ANY (d.indkey)
+ AND ( d.indkey[0]=a.attnum OR d.indkey[1]=a.attnum
+ OR d.indkey[2]=a.attnum OR d.indkey[3]=a.attnum
+ OR d.indkey[4]=a.attnum OR d.indkey[5]=a.attnum
+ OR d.indkey[6]=a.attnum OR d.indkey[7]=a.attnum
+ OR d.indkey[8]=a.attnum OR d.indkey[9]=a.attnum )
ORDER BY i.relname
SQL