>
> I don't have time right now to type up a short summary, but can do
> that later if you like. But the data entry for an SQL92 bit type looks
> like
>
> B'10111'
> X'17'
>
> The underlying data type is BIT(n), a fixed-length type where n is the
> exact number of bits. BIT VARYING (n) allows a variable number of bits
> (duh!) up to n bits. We can support these SQL92 constructs in the
> parser, folding them into an internal type as we do for character
> strings currently.
>
> It could be implemented just like the character types, having a header
> on the internal representation which holds the length. It can't re-use
> the character type support functions as-is, since they currently
> consider a zero byte in the string as end-of-string.
OK, I'll have a go at this as I get a chance. If somebody has the SQL
standard on line and could send me the appropriate sections I would
appreciate it.
As I know very little about the postgres internals I would also
appreciate a short roadmap as to what needs to be done where, i.e. does
the parser need to be changed, and where the files are /new files hsould
go that I need to update. If this is somewhere in the docs please point
me to it.
What I've found upto now is
backend/utils/adt/varlena.c
backend/utils/adt/varchar.c
which I will use as starting point?
I found the file src/backend/lib/bit.c (Bruce's according to the log
message). Has that got anything to do with bit arrays?
Cheers,
Adriaan