Corresponding Type and Size of Data Types in Drupal in order to create a table field in PostgreSQL I was trying to create dynamically a table in Postgres using db_create_table function.

$schema = array(
    'description' =&gt; t ('Contains a particular templates data inputted from the MyID Inputting System'),
    'fields' =&gt; array(
                     'bigint_column' =&gt; array('type' =&gt; 'int', 'size' =&gt; 'big' )
                ),
);

db_create_table('myid_template_1', $schema);


The code above works fine. It creates a table myid_template_1 in my database with a column field bigint_column with a type of bigint.

I also wanted to create fields with the following type:

bit
boolean
character varying
date
double precision
time with timezone
time without timezone
timestamp with timezone
timestamp without timezone


What is its corresponding type and size in Drupal? It is somewhat missing in the documentation I read.

UPDATE 1:

Basing from Sir Mario Steinitz answer, I updated my code above.

$schema = array(
    'description' =&gt; t ('Contains a particular templates data inputted from the MyID Inputting System'),
    'fields' =&gt; array(
                    'bigint_column' =&gt; array(
                                           'type' =&gt; 'datetime',
                                           'size' =&gt; 'normal',
                                           'pgsql_type' =&gt; 'time with timezone'
                     )
                ),
    );


It was not working still. Am I missing something?
The linked documentation is not missing any field types supported by Drupal. For maximum compatibility to all supported database types, the field types of Drupal's database API is limited to the field types you find within the documentation.

This assures that most modules using the default database API will run the same with PostgreSQL as they do with MySQL and almost SQlite.

However, if you need these field types in order to work on database stored information that will be used by other applications, or have another module specific requirement for using them, you can use the 'pgsql_type' attribute within your schema definition.

This attribute overrides the generic 'type' and 'size' attributes.

Within your module, you may need to query / handle the information of these fields on your own, as the Drupal database driver might not always be able to map / fetch them properly to / from your PHP objects / arrays.