Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leonardo F <m_lists(at)yahoo(dot)it>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: Allow substring/replace() to get/set bit values
Date: 2010-01-07 16:58:14
Message-ID: 26851.1262883494@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Leonardo F <m_lists(at)yahoo(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: David FetterDate: 2010-01-07 16:58:30
Subject: Re: Testing with concurrent sessions
Previous:From: Robert HaasDate: 2010-01-07 16:57:43
Subject: Re: Testing with concurrent sessions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group