Search Postgresql Archives

Single character bitfields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a large database and I want to have several fields (among many)
that are single character fields (in fact they are bitfields).

1) Is char(1) the most efficient way to store these fields? If not
what is better?
2) I need to test the field against constants, e.g if the field is
called source then I need tests like:
    IF source = 0x10 THEN ...
   This does not work in plpgsql functions (source is character(1)),
so what is the solution?

Thanks
   Andrew



-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux