Postgres Plus Advanced Server Oracle Compatibility Developer's Guide : 13.3 Type Codes

Previous PageTable Of ContentsNext Page

Postgres Plus Advanced Server Oracle Compatibility Developer's Guide

 

13.3 Type Codes

The following table contains the type codes for external data types. An external data type is used to indicate the type of a C host variable. When an application binds a value to a parameter or binds a buffer to a SELECT-list item, the type code in the corresponding SQLDA descriptor (descriptor->T[column]) should be set to one of the following values:

    Type Code

    Host Variable Type (C Data Type)

    1, 2, 8, 11, 12, 15, 23, 24, 91, 94, 95, 96, 97

    char[]

    3

    int

    4, 7, 21

    float

    5, 6

    null-terminated string
    (char[length+1])

    9

    varchar

    22

    double

    68

    unsigned int

The following table contains the type codes for internal data types. An internal type code is used to indicate the type of a value as it resides in the database. The DESCRIBE SELECT LIST statement populates the data type array (descriptor->T[column]) using the following values.

    Internal Type Code

    Server Type

    1

    VARCHAR2

    2

    NUMBER

    8

    LONG

    11

    ROWID

    12

    DATE

    23

    RAW

    24

    LONG RAW

    96

    CHAR

    100

    BINARY FLOAT

    101

    BINARY DOUBLE

    104

    UROWID

    187

    TIMESTAMP

    188

    TIMESTAMP W/TIMEZONE

    189

    INTERVAL YEAR TO MONTH

    190

    INTERVAL DAY TO SECOND

    232

    TIMESTAMP LOCAL_TZ

Previous PageTable Of ContentsNext Page