bit varying(512) vs bytea(64) - Mailing list pgsql-general

From TJ O'Donnell
Subject bit varying(512) vs bytea(64)
Date
Msg-id 423F30ED.6090203@acm.org
Whole thread Raw
Responses Re: bit varying(512) vs bytea(64)  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
I have N-bit data pairs.  I want to write a c-language function
which compares bits set in each.  N is typically 512, but could be other.
I can store this as bit varying(512) or bytea(64).  I can't decide which.
Here are the questions that concern me.
1) will each take the same storage?
2) can I pass bit varying data to a c-language function?  I can't find any
    docs or examples of that.
3) are bit strings stored as actual bits or as character strings of 0 and 1?

Thanks,
TJ

pgsql-general by date:

Previous
From: Eric Parusel
Date:
Subject: Re: how do I clear a page, or set an item in a page to
Next
From: Alvaro Herrera
Date:
Subject: Re: Encoding-related errors when moving from 7.3 to 8.0.1