How do you store floating-point numbers / real numbers in OpenLDAP? I have never seen such a data type. I know you could store a string representation of a floating-point number, but that sounds like an awful practice.

2 Answers 2


You can shove arbitrary data into an OpenLDAP server, though it's likely to get base64 encoded and decoded along the way, much like sending an email attachment.

It's the matching and ordering rules that could get complicated.

The most likely candidate would be an OctetString.

EQUALITY octetStringMatch ORDERING octetStringOrderingMatch SYNTAX

You should be able to use it to store arbitrary data. (You may not want to include ordering as it's unlikely to achieve the desired effect.)

You may consider limiting the number of bits by tacking a byte limit on the end of the syntax OID. E.g.{8}.


LDAP stores all numbers as strings, but you can configure matching rules in your schema that will treat them as actual numbers for ordering purposes.

  • There are no standard LDAP matching rules for floating point string representation. And one cannot add matching rules to a LDAP server just by configuration. Jul 30, 2019 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .