#include <db.h>
						DB→set_flags(DB *db, u_int32_t flags);


Calling DB→set_flags is additive; there is no way to clear flags.

The flags value must be set to 0 or by bitwise inclusively OR’ing together one or more of the following values.


The following flags may be specified for the Btree access method:

  • DB_DUP Permit duplicate data items in the tree; that is, insertion when the key of the key/data pair being inserted already exists in the tree will be successful. The ordering of duplicates in the tree is determined by the order of insertion, unless the ordering is otherwise specified by use of a cursor operation. It is an error to specify both DB_DUP and DB_RECNUM.

  • DB_DUPSORT Permit duplicate data items in the ...

Get Berkeley DB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.