Search Postgresql Archives

Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Maybe it is us that need some clues from you.

We use perl DBI to read table names, column names, and column types from Oracle rdb 7.3 through ODBC, and then try to create tables into postgresql.

Through perl DBI, we got:


Column Name                     Type  Precision  Scale Nullable?
------------------------------  ----  ---------  ----- ---------

col1 1 4 0 Yes col2 1 4 0 Yes col3 1 2 0 Yes col4 4 11 0 Yes col5 3 4 2 Yes
col6                        93   13         0     Yes
...
...

I'd like to know how to map the integer type value "1, 3, 4, 93, etc" to SQL_type?





May I know where I can find some online documents about mapping the integer values to the following SQL types please?

For example, if I have value 1 , so that I know 1 is mapped to SQL_CHAR; if I have value 3, so that I know 3 is mapped to SQL_NUMERIC.


      Data Types

The following data types are supported:

SQL_CHAR

SQL_VARCHAR

SQL_LONGVARCHAR

SQL_NUMERIC

SQL_DECIMAL

SQL_SMALLINT

SQL_INTEGER

SQL_REAL

SQL_FLOAT

SQL_DOUBLE

SQL_BIT

SQL_TINYINT

SQL_BIGINT

SQL_BINARY

SQL_VARBINARY

SQL_LONGVARBINARY

SQL_TYPE_DATE

SQL_TYPE_TIME

SQL_TYPE_TIMESTAMP

SQL_INTERVALS (all types)
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux