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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Leonardo F <m_lists(at)yahoo(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: Allow substring/replace() to get/set bit values
Date: 2010-01-07 16:37:12
Message-ID: 603c8f071001070837y1f544978i61485aefb988c615@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 7, 2010 at 11:05 AM, Leonardo F <m_lists(at)yahoo(dot)it> 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...
>
>
> I've even got
>
> "ERROR:  invalid memory alloc request size 4244635647"
>
> with:
>
>
> SELECT substring(B'1111000000000001' from 5 for -2);
>
> (this is 8.4.2, windows version, not modified...)
>
>
>
> test=# SELECT substring(B'1111000000000001' from 1 for -1);
> substring
> ------------------
> 1111000000000001
> (1 row)
>
>
> test=# SELECT substring('1111000000000001' from 1 for -1);
> ERROR:  negative substring length not allowed

I haven't tried to reproduce it, but that sounds like a bug.

....Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-07 16:38:12 Re: Testing with concurrent sessions
Previous Message David E. Wheeler 2010-01-07 16:32:02 Re: Testing with concurrent sessions