ODBC Problem with Example

Charles F. Schatz cschatz@REDACTED
Tue Nov 15 19:57:34 CET 2005


I am running Cygwin under Win2k Professional. The latest ODBC drivers from
PostgreSQL website are installed. The database is PostgreSQL 7.3 compatible.

The fundamental problem is character columns are creatable, but not
query-able.

This problem dates back to at least OTP-R9C.

=============================================================

$ erl

=PROGRESS REPORT==== 15-Nov-2005::09:58:15 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.32.0>},
                       {name,alarm_handler},
                       {mfa,{alarm_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 15-Nov-2005::09:58:15 ===
          supervisor: {local,sasl_safe_sup}
             started: [{pid,<0.33.0>},
                       {name,overload},
                       {mfa,{overload,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 15-Nov-2005::09:58:15 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.31.0>},
                       {name,sasl_safe_sup},
                       {mfa,{supervisor,
                                start_link,
                                [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 15-Nov-2005::09:58:15 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.34.0>},
                       {name,release_handler},
                       {mfa,{release_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]
Eshell V5.4.8  (abort with ^G)

=PROGRESS REPORT==== 15-Nov-2005::09:58:16 ===
         application: sasl
          started_at: nonode@REDACTED
1> {ok, Ref} = odbc:connect("DSN=PostgreSQL",[]).

=PROGRESS REPORT==== 15-Nov-2005::09:58:34 ===
         application: odbc
          started_at: nonode@REDACTED

=INFO REPORT==== 15-Nov-2005::09:58:34 ===
The odbc application was not started. Has now been started as a temporary
application. {ok,<0.45.0>}
2> odbc:sql_query(Ref,"create table test (varchar char 
2> varying(40),char_array char(40),int4 int4)").
{updated,0}
3> odbc:describe_table(Ref,"test").
{ok,[{"varchar",'ODBC_UNSUPPORTED_TYPE'},
     {"char_array",'ODBC_UNSUPPORTED_TYPE'},
     {"int4",sql_integer}]}
4>

=============================================================

Using other means, the database table 'test' has been inspected and shows
the correct character column types after creation. The odbc drivers or the
erlang code (not certain which) appear to have an asymmetric type
characteric.

Does anyone out there have a insight into the problem?

Charles F. Schatz



More information about the erlang-questions mailing list