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

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc
Дата
Msg-id 43FE29A2.2010407@encs.concordia.ca
обсуждение исходный текст
Ответ на Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc  (Ragnar <gnari@hive.is>)
Ответы Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc  (Ragnar <gnari@hive.is>)
Список pgsql-general
>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@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: "Brandon Metcalf"
Дата:
Сообщение: Re: subtracting minutes from date
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc