Thread: Any plans to support SQLDescribeParam (and friends) ?
Hi Previously PsqlODBC did not support SQLDescribeParam (and friends), as the PostgreSQL backend/frontend protocol did not offer the necessary support to implement these functions [1]. Or at least, that is how I understand it. But with protocol version 3, it should be possible to implement SQLDescribeParam[2]. Thus my question, is there any plans to support SQLDescribeParam (and friends) ? Regards, Mads Lindstrøm [1] http://library.pantek.com/Mailing% 20Lists/postgresql.org/pgsql-interfaces/03/03/11602.html [2] http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO search for PQnparams, PQparamtype
Attachment
Mads Lindstrøm wrote: > Hi > > Previously PsqlODBC did not support SQLDescribeParam (and friends), as > the PostgreSQL backend/frontend protocol did not offer the necessary > support to implement these functions [1]. Or at least, that is how I > understand it. > > But with protocol version 3, it should be possible to implement > SQLDescribeParam[2]. > > Thus my question, is there any plans to support SQLDescribeParam (and > friends) ? You can call SQLDescribeParam() with the current driver when you check the 7.4+ Protocol option and the Server side prepare option. regards, Hiroshi Inoue
Hi Hiroshi, Thank you for the reply. Hiroshi Inoue wrote: > Mads Lindstrøm wrote: > > Hi > > > > Previously PsqlODBC did not support SQLDescribeParam (and friends), as > > the PostgreSQL backend/frontend protocol did not offer the necessary > > support to implement these functions [1]. Or at least, that is how I > > understand it. > > > > But with protocol version 3, it should be possible to implement > > SQLDescribeParam[2]. > > > > Thus my question, is there any plans to support SQLDescribeParam (and > > friends) ? > > You can call SQLDescribeParam() with the current driver when you > check the 7.4+ Protocol option and the Server side prepare option. > > regards, > Hiroshi Inoue > Yes, I can call SQLDescribeParam(..), but it always return VarChar, on SMALLINT, INTEGER, BIGINT and DECIMAL parameters. So I guess I am doing something wrong. My odbc.ini looks like: [MetaHDBC_PQ_DSN] Description = PostgreSQL ODBC Driver = postgreodbc Trace = No TraceFile = Database = MetaHDBC_DB Servername = localhost UserName = metahdbc Password = foobar Port = 5432 Protocol = 8.3 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = #ServerSidePrepare = Yes UseServerSidePrepare = Yes And the odbcinst.ini looks like: [postgreodbc] Description = PostgreSQL ODBC driver Driver = /usr/lib/odbc/psqlodbcw.so #Setup = /usr/lib/odbc/libodbcpsqlS.so Debug = 0 CommLog = 1 UsageCount = 2 Do anybody have an idea of why I only see VarChar when calling SQLDescribeParam(..) ? Or any pointers to how I can debug the problem. I am running on Debian Linux (Lenny) using psqlodbc version (1:08.03.0200-1) (see http://packages.debian.org/source/lenny/psqlodbc ). Regards, Mads Lindstrøm
Attachment
Hi Mads, Mads Lindstrøm wrote: > Hi Hiroshi, > > Thank you for the reply. > > > Hiroshi Inoue wrote: > >> Mads Lindstrøm wrote: >>> Hi >>> >>> Previously PsqlODBC did not support SQLDescribeParam (and friends), as >>> the PostgreSQL backend/frontend protocol did not offer the necessary >>> support to implement these functions [1]. Or at least, that is how I >>> understand it. >>> >>> But with protocol version 3, it should be possible to implement >>> SQLDescribeParam[2]. >>> >>> Thus my question, is there any plans to support SQLDescribeParam (and >>> friends) ? >> You can call SQLDescribeParam() with the current driver when you >> check the 7.4+ Protocol option and the Server side prepare option. >> >> regards, >> Hiroshi Inoue >> > > Yes, I can call SQLDescribeParam(..), but it always return VarChar, on > SMALLINT, INTEGER, BIGINT and DECIMAL parameters. So I guess I am doing > something wrong. > > My odbc.ini looks like: > > [MetaHDBC_PQ_DSN] > Description = PostgreSQL ODBC > Driver = postgreodbc > Trace = No > TraceFile = > Database = MetaHDBC_DB > Servername = localhost > UserName = metahdbc > Password = foobar > Port = 5432 > Protocol = 8.3 Could you try to set Protocol = 7.4 ? regards, Hiroshi Inoue
Hi Hiroshi, Hiroshi Inoue wrote: > >> You can call SQLDescribeParam() with the current driver when you > >> check the 7.4+ Protocol option and the Server side prepare option. > >> > >> regards, > >> Hiroshi Inoue > >> > > > > Yes, I can call SQLDescribeParam(..), but it always return VarChar, on > > SMALLINT, INTEGER, BIGINT and DECIMAL parameters. So I guess I am doing > > something wrong. > > > > My odbc.ini looks like: > > > > [MetaHDBC_PQ_DSN] > > Description = PostgreSQL ODBC > > Driver = postgreodbc > > Trace = No > > TraceFile = > > Database = MetaHDBC_DB > > Servername = localhost > > UserName = metahdbc > > Password = foobar > > Port = 5432 > > Protocol = 8.3 > > Could you try to set > Protocol = 7.4 > ? > > regards, > Hiroshi Inoue > Same results with Protocol = 7.4 Regards, Mads