aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-05-28 22:00:47 +0900
committerGitHub <noreply@github.com>2018-05-28 22:00:47 +0900
commit8c3bf602cd5329cab3c6572958bc2950b857e149 (patch)
tree548ad26807acef49f3af8e0f31485227928cf25d /activerecord/lib
parentb677201b25bc038b4cf815c3c72cc1e56447d623 (diff)
parentbbe3e7f298c1b99724f9b4c3b3cbc8778b210342 (diff)
downloadrails-8c3bf602cd5329cab3c6572958bc2950b857e149.tar.gz
rails-8c3bf602cd5329cab3c6572958bc2950b857e149.tar.bz2
rails-8c3bf602cd5329cab3c6572958bc2950b857e149.zip
Merge pull request #33004 from nlpgo/master
Fix: Arel Postgresql visitor generates invalid SQL for GROUPING SETS.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/arel/visitors/postgresql.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/arel/visitors/postgresql.rb b/activerecord/lib/arel/visitors/postgresql.rb
index 108ee431ee..c5110fa89c 100644
--- a/activerecord/lib/arel/visitors/postgresql.rb
+++ b/activerecord/lib/arel/visitors/postgresql.rb
@@ -5,7 +5,7 @@ module Arel # :nodoc: all
class PostgreSQL < Arel::Visitors::ToSql
CUBE = "CUBE"
ROLLUP = "ROLLUP"
- GROUPING_SET = "GROUPING SET"
+ GROUPING_SETS = "GROUPING SETS"
LATERAL = "LATERAL"
private
@@ -67,7 +67,7 @@ module Arel # :nodoc: all
end
def visit_Arel_Nodes_GroupingSet(o, collector)
- collector << GROUPING_SET
+ collector << GROUPING_SETS
grouping_array_or_grouping_element o, collector
end