bit varying(512) vs bytea(64)

From: TJ O'Donnell <tjo(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: bit varying(512) vs bytea(64)
Date: 2005-03-21 20:39:09
Message-ID: 423F30ED.6090203@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-03-21 20:44:32 Re: Encoding-related errors when moving from 7.3 to 8.0.1
Previous Message Eric Parusel 2005-03-21 20:38:36 Re: how do I clear a page, or set an item in a page to