Re: hstore ==> and deprecate =>
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: "David E. Wheeler" <david@kineticode.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-06-17T23:15:10Z
Lists: pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes: > Currently for hstore, %% returns a flattened array and %# returns a > two-dimensional array. That means that it makes sense that the operator > which returns an hstore subset should be something based on %, either > %>, %% or just %. But %% and %# are prefix operators. Extrapolating from those to an infix operator seems a bit thin. Nonetheless, something using % seems better than something using &, for the other reasons you mention. > I vote for % . I'd vote for %>, out of those. Reason: the operator isn't commutative, in fact left and right inputs aren't even the same datatype, so a glyph that looks asymmetric seems more natural. > Using % would also mean that sometime in the future we can implement !% > as "elements NOT in this list" (i.e. ' a => 1, b => 2, c => 5' !% 'a, b' > == 'c => 5' ) You can prepend ! to any operator name at all, so that's not much of a differentiator. regards, tom lane