From: | José Soares <jose(at)sferacarta(dot)com> |
---|---|
To: | Adriaan Joubert <a(dot)joubert(at)albourne(dot)com> |
Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, Postgresql <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Re: [GENERAL] Update of bitmask type |
Date: | 1999-09-24 13:01:19 |
Message-ID: | 37EB761F.D7A1105E@sferacarta.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Adriaan Joubert ha scritto:
> Hannu Krosing wrote:
> >
> > Adriaan Joubert wrote:
> > >
> > > b) seems to imply, rather bizarrely in my opinion, that
> > >
> > > B'001100' < B'10'
> > >
> > Maybe you start counting from the wrong end ?
> >
> > Just use them as you use char()
> >
> > 'AABBAA' < 'BA'
> >
> > Does it say something in the standard about direction,
> > is it left-> right or right->left ?
>
> No, not that I could find. But in the above example B'001100' < B'10'
> whichever end you start counting from, as 1>0. I have no particularly
> strong opinion on which way round it should be done -- perhaps we should
> just try to be consistent with other databases? Could somebody who has
> access to Oracle or Sybase please do a few tests and let me know?
>
Oracle doesn't have this data type neither Informix. I think it is hard to
find this data type in any database.
I found this feature in the OCELOT database
You can download it from:
http://ourworld.compuserve.com/homepages/OCELOTSQL/
As they say:
"Ocelot makes the only Database Management System (DBMS) that supports the
full ANSI / ISO
SQL Standard (1992), and an always-growing checklist of SQL3 features (also
known as SQL-99)."
A second problem I encountered last night is that the postgres variable
> length types only allow for the length of an array to be stored in
> bytes. This means that the number of bits will automatically always be
> rounded up to the nearest factor of 8, i.e. you want tp store 3 bits and
> you get 8. For ordering and output this is not always going to produce
> the correct output, as the bitstrings will get zero-padded. Is there
> anywhere else where one could store the exact length of a bit string?
>
> I haven't quite understood what the variable attypmod is. In varchar.c
> it looks as if it is the length of the record, but if it is just an
> integer identifier, then I could store the exact length in there. In
> that case I could handle the difference between 3 and 5 bit strings
> correctly. My main worry was that this might be used in other routines
> to determine the length of a record.
>
> Adriaan
>
> ************
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 1999-09-24 14:21:20 | Re: [HACKERS] Re: [GENERAL] Update of bitmask type |
Previous Message | Marc Blanc | 1999-09-24 10:31:27 | source code sgml |
From | Date | Subject | |
---|---|---|---|
Next Message | José Soares | 1999-09-24 13:19:52 | Re: [HACKERS] create rule changes table to view ? |
Previous Message | Peter Eisentraut | 1999-09-24 10:38:19 | psql issues |