Re: [HACKERS] Re: [GENERAL] Update of bitmask type

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: [GENERAL] Update of bitmask type
Дата
Msg-id 199909270044.UAA27257@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [GENERAL] Update of bitmask type  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
> attypmod has been modified recently to contain two fields (each of 16
> bits) in a backward-compatible way. It can hold the size *and*
> precision of the numeric data types, and presumably should be used in
> a similar manner for your bit type.

You can use a union to split atttypmod up into two 8-bit fields and on
16-bit field.  Let me know if you need help.


> 
> The problem is that you need another field which contains a length in
> bit units. Assuming that the second field in attypmod can't be used
> for this purpose, then istm that you will want to add a field to the
> data type itself. The character types have:
> 
>   length - total size of data, in bytes (4 bytes)
>   data   - body
> 
> and you might have
> 
>   length - total size of data, in bytes (4 bytes)
>   blen   - total size of data, in bits (4 bytes)
>   data   - body
> 
>                     - Thomas
>   
> -- 
> Thomas Lockhart                lockhart@alumni.caltech.edu
> South Pasadena, California
> 
> ************
> 
> 


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] libpq.rc for Win32
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] int8 and index