Re: hstore ==> and deprecate =>
От | Tom Lane |
---|---|
Тема | Re: hstore ==> and deprecate => |
Дата | |
Msg-id | 27967.1276816510@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: hstore ==> and deprecate => (Josh Berkus <josh@agliodbs.com>) |
Ответы |
Re: hstore ==> and deprecate =>
Re: hstore ==> and deprecate => Re: hstore ==> and deprecate => |
Список | 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
В списке pgsql-hackers по дате отправления: