Re: Column types via ODBC interface

From: Matt Goodall <mgg(at)isotek(dot)co(dot)uk>
To:
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Column types via ODBC interface
Date: 2000-06-08 09:41:20
Message-ID: 393F6A40.FFD7706F@isotek.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> Matt Goodall <mgg(at)isotek(dot)co(dot)uk> writes:
> > f10 decimal(9,2) SQL_VARCHAR, 254 SQL_DECIMAL, 9
> > f11 numeric(9,2) SQL_VARCHAR, 254 SQL_DECIMAL, 9
>
> The 6.5 ODBC driver doesn't know about type numeric, so it returns its
> default assumption, which is varchar as above. The 7.0 version knows
> about numeric, however.

Great - I'll upgrade to v 7.x then.

> The SQL type returned for "bool" appears to be a user-settable option.

Sorry if I've missed something obvious in the docs but is that a
postgres setting or an odbc driver manager setting?

> The choices made for floating types look reasonably plausible.
> If you think they're wrong, you'll need to argue why, not just
> assert that you think they are. It's easy enough to change the
> ODBC driver's SQL type <=> Postgres type mapping if there's a
> better definition than what we're using...
>
> regards, tom lane

Fair enough - I should have explained my reasoning here.

Here's an bit from table 3-1.Postgres Data Types in the 6.5.3
documentation:

Postgres Type SQL92 or SQL3 Type
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
...
float4/8 float(p)
float8 real, double precision
...

I was expecing that to mean that float4/8 would map to an ODBC SQL_FLOAT
and float8 would map to either SQL_REAL or SQL_DOUBLE.

Cheers, Matt.

--
Matt Goodall | Isotek Electronics Ltd
email: mgg(at)isotek(dot)co(dot)uk | Claro House, Servia Road
Tel: +44 113 2343202 | Leeds, LS7 1NL
Fax: +44 113 2342918 | England

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paulo Jan 2000-06-08 11:15:41 Re: existing but not-existing database.
Previous Message John Daniels 2000-06-08 09:22:11 Re: FreeBSD PostgreSQL7 port and v7.0.2