bit string functions

Started by TJ O'Donnellover 18 years ago5 messages
#1TJ O'Donnell
tjo@gnova.com

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

#2Andrew Sullivan
ajs@crankycanuck.ca
In reply to: TJ O'Donnell (#1)
Re: bit string functions

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

#3Gregory Stark
stark@enterprisedb.com
In reply to: Andrew Sullivan (#2)
Re: bit string functions

"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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gregory Stark (#3)
Re: bit string functions

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

#5Gregory Stark
stark@enterprisedb.com
In reply to: Tom Lane (#4)
Re: bit string functions

"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