Thread: bit string functions

bit string functions

From
TJ O'Donnell
Date:
I have been working extensively with the bit string data type.
I have a number of useful c-language functions to
set/clear a bit, count number of bits set, inquire if
a bit is set/clear, etc.
I don't see functions like these as part of any SQL standard,
(although I think they ought to be).

I would like to make these a part of postgresql for others to use.
Is it more appropriate for these to be in contrib code
or part of the postgresql proper?
How can I contribute these?

TJ
-- 
TJ O'Donnell, Ph.D.
President, gNova Inc.
tjo@gnova.com
http://www.gnova.com


Re: bit string functions

From
Andrew Sullivan
Date:
On Mon, Jul 16, 2007 at 09:40:18AM -0700, TJ O'Donnell wrote:
> I would like to make these a part of postgresql for others to use.
> Is it more appropriate for these to be in contrib code
> or part of the postgresql proper?
> How can I contribute these?

I would say just set up a project on pgfoundry. 

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
The very definition of "news" is "something that hardly ever happens."        --Bruce Schneier


Re: bit string functions

From
Gregory Stark
Date:
"Andrew Sullivan" <ajs@crankycanuck.ca> writes:

> On Mon, Jul 16, 2007 at 09:40:18AM -0700, TJ O'Donnell wrote:
>> I would like to make these a part of postgresql for others to use.
>> Is it more appropriate for these to be in contrib code
>> or part of the postgresql proper?
>> How can I contribute these?
>
> I would say just set up a project on pgfoundry. 

I agree, though I think in the long term we do need a more complete set of
operators and functions in core. But we need consensus on which set people
find necessary and pgfoundry is a good place to do that.

I think the main guiding force will be which sets of operators and functions
become necessary to have operator classes for indexes.


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



Re: bit string functions

From
Tom Lane
Date:
Gregory Stark <stark@enterprisedb.com> writes:
> "Andrew Sullivan" <ajs@crankycanuck.ca> writes:
>> I would say just set up a project on pgfoundry. 

> I agree, though I think in the long term we do need a more complete set of
> operators and functions in core.

Considering that BIT and BIT VARYING have been removed entirely from
SQL:2003, it seems unlikely to me that we should expend our limited
resources in that particular direction.
        regards, tom lane


Re: bit string functions

From
Gregory Stark
Date:
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> "Andrew Sullivan" <ajs@crankycanuck.ca> writes:
>>> I would say just set up a project on pgfoundry. 
>
>> I agree, though I think in the long term we do need a more complete set of
>> operators and functions in core.
>
> Considering that BIT and BIT VARYING have been removed entirely from
> SQL:2003, it seems unlikely to me that we should expend our limited
> resources in that particular direction.

Hm, just thinking aloud here but, in our type system I wonder how hard it
would be to write a special data type to use for _boolean. Offhand anyarray
and anyelement might do funny things but if it supplies *all* the array
operators and functions perhaps it would just work.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com