On Sat, Feb 5, 2011 at 02:29, Robert Haas <robertmh...@gmail.com> wrote: > I am still not in favor of adding this syntax.
I also don't like the syntax, but unfortunately, almost all of them are in the SQL standard :-(. In addition, Oracle already uses the same feature with the special syntax, though true multiset data types are supported in it. > [It sure is awkward that trim_array has the word > array second and all of our other array functions have it first - is > this required by the spec?] Yes, again, but we could have array_trim() for the alias. > array_to_set() and array_is_set() seem possibly useful, but I probably > would have called them array_remove_dups() and array_has_dups(). I > might be in the minority on that one, though. array_to_set is the only function we can rename freely. Another candidates might be array_unique (contrib/intarray uses uniq). array_is_set() is an internal representation of "IS A SET" operator. So, the name is not so important (and not documented.) > I think array_subset(), array_union(), array_intersect(), and > array_except() are useful, but I think they should just be regular > functions, without any special syntax. All of the special syntax are in the spec, except the argument types should be multisets rather than arrays. > fusion() and intersection() also seem useful, but maybe it would be > more consistent to all them array_fusion() and array_intersection(). Both of the names are the standard... We could have array_fusion() for array types and fusion() for multiset types, but I prefer overloaded fusion() to have both names. -- Itagaki Takahiro -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers