From: Michael P. <mic...@gm...> - 2013-04-21 23:32:25
|
On Mon, Apr 22, 2013 at 3:57 AM, Nikhil Sontakke <ni...@st...>wrote: > Hi all, > > Consider the following: > > create sequence seqname increment by -2; > select nextval('seqname'); > ERROR: GTM error, could not obtain sequence value > > The above should have returned -1. > > ISTM, the sequence fetching logic on the backend side has been coded > entirely with the assumption that sequences can never have negative values. > So a less than 0 value returned from get_next() is assumed to be a problem! > That's completely wrong. We need to deal with this properly. I will submit > a patch for this when I get some time soon. > Adding a regression test in xc_sequence.sql would also be good to cover this case as this is caused by xc-only code. -- Michael |