Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-08 Thread Dimitri Fontaine
Alvaro Herrera writes: > Leonardo F wrote: >> How can I keep up with "who's doing what"? > > Read this list and pgsql-committers. Or subscribe to the RSS feed from: http://git.postgresql.org/gitweb?p=postgresql.git;a=summary -- dim -- Sent via pgsql-hackers mailing list (pgsql-hackers@post

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-08 Thread Alvaro Herrera
Leonardo F wrote: > > What we can do in the back branches is make the code treat any > > negative value as meaning two-arg form. To throw an error we'd > > need to refactor the pg_proc representation ... > > I was going to fix that myself, but I think it has just been done. > > How can I keep up

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-08 Thread Leonardo F
> What we can do in the back branches is make the code treat any > negative value as meaning two-arg form. To throw an error we'd > need to refactor the pg_proc representation ... I was going to fix that myself, but I think it has just been done. How can I keep up with "who's doing what"? -

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-07 Thread Tom Lane
Leonardo F writes: > I've even got > "ERROR: invalid memory alloc request size 4244635647" > with: > SELECT substring(B'0001' from 5 for -2); Hm, yeah, somebody was sloppy about exposing the three-argument form of varbit substring and using -1 to represent the two-argument form. W

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-07 Thread Robert Haas
On Thu, Jan 7, 2010 at 11:05 AM, Leonardo F wrote: >> Thanks!  Please add your patch here: >> >> https://commitfest.postgresql.org/action/commitfest_view/open >> > > > Ok; but what about what I said about the difference between bit/string > substring? > That affects overlay behaviour for bit... >

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-07 Thread Leonardo F
> Thanks! Please add your patch here: > > https://commitfest.postgresql.org/action/commitfest_view/open > Ok; but what about what I said about the difference between bit/string substring? That affects overlay behaviour for bit... I've even got "ERROR: invalid memory alloc request size 42

Re: [HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-07 Thread Robert Haas
On Thu, Jan 7, 2010 at 7:02 AM, Leonardo F wrote: > attached a patch that adds the following functions for bit string: Thanks! Please add your patch here: https://commitfest.postgresql.org/action/commitfest_view/open The next CommitFest starts January 15th. ...Robert -- Sent via pgsql-hacke

[HACKERS] Patch: Allow substring/replace() to get/set bit values

2010-01-07 Thread Leonardo F
Hi all, attached a patch that adds the following functions for bit string: - overlay - get_bit - set_bit Some info: 1) overlay is implemented as calls to substring; given the different way substring behaves when used with strings vs bit strings: test=# SELECT substring(B'0001' f