Re: Patch: Allow substring/replace() to get/set bit values - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: Allow substring/replace() to get/set bit values
Date
Msg-id 26851.1262883494@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: Allow substring/replace() to get/set bit values  (Leonardo F <m_lists@yahoo.it>)
Responses Re: Patch: Allow substring/replace() to get/set bit values  (Leonardo F <m_lists@yahoo.it>)
List pgsql-hackers
Leonardo F <m_lists@yahoo.it> writes:
> I've even got 
> "ERROR:  invalid memory alloc request size 4244635647" 
> with:
> SELECT substring(B'1111000000000001' 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.

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 ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Testing with concurrent sessions
Next
From: David Fetter
Date:
Subject: Re: Testing with concurrent sessions