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

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: emilu(at)encs(dot)concordia(dot)ca
Cc: Ragnar <gnari(at)hive(dot)is>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc
Date: 2006-02-23 21:35:25
Message-ID: 1140730525.18756.6.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2006-02-23 at 15:31, Emi Lu wrote:
> >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?

Assuming that those type numbers come from Oracle, you got me. Can you
use some oracle tool to look at the table structure and compare it to
the numbers you get and make a map?

If they're numbers from Oracle, you likely won't get much help here.
Only a few folks here are all that intimate with oracle's inner
workings. Heck, I use it every day, and I still don't know this kind of
stuff, and hope I never have to. :)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-23 21:43:27 Re: Limitations : Number of ...
Previous Message Emi Lu 2006-02-23 21:31:14 Re: SQL TYPE MAP such as SQL_CHAR, SQL_NUMERIC , etc