Re: hstore improvements?
От | Andrew Gierth |
---|---|
Тема | Re: hstore improvements? |
Дата | |
Msg-id | 87mybpgllw.fsf@news-spur.riddles.org.uk обсуждение исходный текст |
Ответ на | Re: hstore improvements? ("David E. Wheeler" <david@kineticode.com>) |
Ответы |
Re: hstore improvements?
|
Список | pgsql-hackers |
>>>>> "David" == "David E Wheeler" <david@kineticode.com> writes: >> select ('a=>1,b=>2,c=>3'::hstore) -> ARRAY['a','b'];>> -- returns '{1,2}'>> >> select ('a=>1,b=>2,c=>3'::hstore) => ARRAY['a','b'];>>-- returns 'a=>1,b=>2'>> >> (by analogy to the existing operators -> for lookup and => for>> construction) David> Is a more Perlish syntax out of the question? Yes. Sorry. David> SELECT ('a=>1,b=>2,c=>3'::hstore)['a', 'b'];David> -- returns '{1,2}' That would require integrating hstore into core - array subscripting isn't a user-definable operation. David> select ('a=>1,b=>2,c=>3'::hstore){'a','b'};David> -- returns 'a=>1,b=>2' And that would require changing the parser... -- Andrew (irc:RhodiumToad)
В списке pgsql-hackers по дате отправления: