From a2075f4142355900bf9e3d19c70248f614363a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 17 Feb 2014 10:49:38 -0300 Subject: Revert "Merge pull request #13344 from ccutrer/fix-from-default-select" This reverts commit 3ea840355409dc205a9e0d027fc09f1452636969, reversing changes made to e4cde5d58cbb09d1843796f96ba86225ff94fe05. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/query_methods.rb Reason: using `from` without `select` should not change the select list to SELECT * because it can lead different query results. If it is needed to change the table to a subquery or a view you can pass a table alias in the `from` call or use `select('subquery.*')`. Fixes #14049. --- activerecord/CHANGELOG.md | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index e49a0f1323..458b9d77c2 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -533,22 +533,6 @@ *Damien Mathieu* -* Improve the default select when `from` is used. - - Previously, if you did something like Topic.from(:temp_topics), it - would generate SQL like: - - SELECT topics.* FROM temp_topics; - - Which is will cause an error since there's not a topics table to select - from. - - Now the default if you use from is just `*`: - - SELECT * FROM temp_topics; - - *Cody Cutrer* - * Fix `PostgreSQL` insert to properly extract table name from multiline string SQL. Previously, executing an insert SQL in `PostgreSQL` with a command like this: -- cgit v1.2.3