SET TRUEBITCREATE
The SET TRUEBITCREATE statement allows you to specify whether the BIT data type can be indexed and can map to the LOGICAL transactional data type.
Syntax
SET TRUEBITCREATE = < on | off >
Remarks
The default is “on.” This means that the BIT data type is 1 bit, cannot be indexed and is assigned a Pervasive PSQL type code of 16. When of type code 16, BIT has no equivalent transactional data type to which it maps.
For certain situations, such as compatibility with other DBMS applications, you may want to map BIT to the LOGICAL data type and be able to index the BIT data type. To do so, set TRUEBITCREATE to “off.” This maps BIT to LOGICAL, which is a 1-byte data type of type code 7.
The creation mode remains in effect until it is changed by issuing the statement again, or until the database connection is disconnected. Because this setting is maintained on a per-connection basis, separate database connections can maintain different creation modes, even within the same application. Every connection starts with the setting in default mode, where BITs are created with a Pervasive PSQL type code of 16.
This feature does not affect existing BITs, only ones created after the set statement is applied.
This setting can be toggled only by using SQL. It cannot be set using the Pervasive PSQL Control Center. Note that Table Editor displays the relational data types for columns (so the type is displayed as “BIT”). If TRUEBITCREATE is set to “off,” Table Editor allows you to index the BIT column.
Example
To toggle the setting and specify that new BITs should be created to allow indexing, map to the LOGICAL transactional data type, and have a type code of 7:
SET TRUEBITCREATE=OFF