Binary number data type?

From: Doug Younger <postgres(at)mindspring(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Binary number data type?
Date: 1998-10-05 16:13:51
Message-ID: 199810051617.MAA07367@dewdrop2.mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I was wondering if there is any way to implement a binary number type and
allow binary math functions (xor, and, or, etc.) on that data in queries etc.
Specifically what I'm trying to do is store what departments an employee
works in (can be in multiple departments) and store that in a small amount
of space (16 departments could be 16 bit = 2bytes) and binary xor could be
used to create masks to easily return people in particular sets of
departments... I also have other uses for this as well.
I don't think that binary data and operations are part of any specific
SQL standard so I don't know if there would be any hope of getting support
for this added if it isn't currently supported?

-Doug Younger
Programmer, MindSpring Enterprises
"Any sufficiently advanced technology is indistinguishable from magic"
-> Arthur C. Clarke

Browse pgsql-general by date

  From Date Subject
Next Message Sangeeta Rao 1998-10-05 17:03:41 Default 'timestamp' value on HP-UX running Postgresql6.3.2
Previous Message David Hartwig 1998-10-05 14:33:37 Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)