Preserve aggregated attributes of singleton groups
This commit is contained in:
parent
b34a752172
commit
cecba655eb
@ -304,8 +304,9 @@ BEGIN
|
||||
-- 'A', 'B', 'A', 'C', 'D' => 'A/B/C/...'
|
||||
-- Other ideas: if value is unique then use it, otherwise use something
|
||||
-- like '*' or '(varies)' or '(multiple values)', or NULL
|
||||
RETURN '''''::' || column_type;
|
||||
ELSE RETURN 'NULL::' || column_type;
|
||||
RETURN 'CASE count(*) WHEN 1 THEN string_agg(' || qualified_column || ',''/'') ELSE ''*''' || ' END::' || column_type;
|
||||
ELSE
|
||||
RETURN 'CASE count(*) WHEN 1 THEN MIN(' || qualified_column || ') ELSE NULL END::' || column_type;
|
||||
END CASE;
|
||||
END
|
||||
$$ LANGUAGE PLPGSQL IMMUTABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user