Re: I: TODO: Allow substring/replace() to get/set bit values
От | Leonardo F |
---|---|
Тема | Re: I: TODO: Allow substring/replace() to get/set bit values |
Дата | |
Msg-id | 169603.9267.qm@web29008.mail.ird.yahoo.com обсуждение исходный текст |
Ответ на | Re: I: TODO: Allow substring/replace() to get/set bit values (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: I: TODO: Allow substring/replace() to get/set bit
values
|
Список | pgsql-hackers |
> As you say, there's really no point in changing the internal > representation, and if you don't find replace() useful either, then > why are you even working on this at all? I would like a get_bit / set_bit for bit strings, as I find them useful. get_bit could be a simple call to substring, but there's no way of doing a set_bit on a bit string as far as I know. I don't like the "replace" syntax for bit strings since it won't give you the same functionality of set_bit, plus I don't really see how someone would want to look for a bit string and replace it with another bit string. But I see that someone might want to overlay a bit string with another (this is different from "replace" since you have to tell the position where the replacing would start, instead of looking for a bit string). To sum up: 1) a new function, "get_bit", that calls substring 2) a new function, "overlay", that replaces bits (starting at a certain position) 3) a new function, "set_bit", that calls overlay > Since the latest discussion > of this is more than five years old, it's unclear that anyone even > cares any more. It seems to me that making replace overlay a > substring of bits could be a reasonable thing to do, but if nobody > actually wants it, then the simplest thing to do is remove this from > the TODO and call it good. I understand: it would be both a useful feature to me and a way to start coding postgres. But, of course, if there's no interest, I'll pass...
В списке pgsql-hackers по дате отправления: