       ]
 
       output.push sets[node.op]
-      output.push 'ALL' if node.all
+
+      if node.all
+        output.push 'ALL'
+
       output.push '(' + @deparse(node.rarg) + ')'
 
     if node.distinctClause

        @deparse(item)

    type = []
    type.push @type(node['names'], args?.join(', '))
    type.push '[]' if node.arrayBounds?

    output.push type.join('')

    if node.rarg
      # wrap nested join expressions in parens to make the following symmetric:
      # select * from int8_tbl x cross join (int4_tbl x cross join lateral (select x.f1) ss)
      if node.rarg.JoinExpr? and not node.rarg.JoinExpr.alias?
        output.push '(' + @deparse(node.rarg) + ')'
      else
        output.push @deparse(node.rarg)
