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

bitfromint4() in v7.2.3 to bit() in v8.1?

From: Björn Þór Jónsson <bangsi(at)bthj(dot)is>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bitfromint4() in v7.2.3 to bit() in v8.1?
Date: 2009-04-21 02:01:56
Message-ID: 9e3f7cd20904201901s34a64071lc333539f60829145@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,
In version 7.2.3 this works fine:

select substring(bitfromint4(cast (-2^31 + 22 as int4)), 1, 32);

and now I'm porting the legacy code, that this line is part of, to version
8.1 but am having no luck updating it - have tried something like:

select substring(bit(cast (-2^31 + 22 as int4)), 1, 32);
and
select substring("bit"(cast (-2^31 + 22 as int4)), 1, 32);
and
select substring(1::"bit"(cast (-2^31 + 22 as int4)), 1, 32);

with no luck.


How can this be solved?


/Björn

Responses

pgsql-bugs by date

Next:From: Paolo SaulDate: 2009-04-21 04:04:57
Subject: Segfaults When Inserting into a Geom Index
Previous:From: hubert depesz lubaczewskiDate: 2009-04-20 22:24:32
Subject: Re: Scripting issue

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