Re: [HACKERS] info on unixODBC/Postgres driver port to IRIX 6.5.7 64bit

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Murad Nayal <murad(at)godel(dot)bioc(dot)columbia(dot)edu>
Cc: unixodbc-dev(at)unixodbc(dot)org, bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org
Subject: Re: [HACKERS] info on unixODBC/Postgres driver port to IRIX 6.5.7 64bit
Date: 2000-06-15 14:16:54
Message-ID: 200006151416.KAA06583@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-ports

Is this patch based on the current snapshot? I have applied several
unixODBC patches in the past several days that may already fix these
problems.

>
>
> Hello,
>
> This is a report on my attempts to install unixODBC (1.8.9) and postgres
> odbc driver on IRIX 6.5.7 64bit using the native compiler. There are a
> number of changes that were necessary to be made on both the
> configuration files and source to get it to compile. patches are
> attached. some of these were derived from 1.8.8, but they all apply
> successfully on 1.8.9.
>
> UnixODBC
> --------
>
> 1- you can ignore the changes to acinclude.m4. they are a hack to
> augment the qt libraries for my platform. a more thoughtful allowance
> for this possibility though might be needed.
>
> 2- I had to propagate USER_LDFLAGS into DataManager/Makefile.in,
> ODBCConfig/Makefile.in and odbctest/Makefile.am adding it to LDADD
> flags. There is no reason not to and they were needed in my case to find
> all qt related libraries.
>
> 3- The IRIX native compiler does not like having new lines in strings. I
> had to delete spurious new lines from a few strings in
> DataManager/classLogin.cpp and DataManager/classISQL.cpp
>
> 4- default values for function arguments were defined twice in a number
> of files. in the headers as well as in cpp files. IRIX compiler does not
> like that besides it is a maintenance burden. I kept the default
> arguments in the header files only (see patch).
>
> 5- Needed to insert explicit type casts in some places as well as
> leading function prototypes (see patch).
>
> Postgres ODBC driver
> --------------------
>
> 6- One bug that was hard to track was related to the postgres driver.
> The driver defines #define Int4 long int; in psqlodbc.h. unfortunately,
> when compiling 64bit a long int is 8 bytes. for my setup I hacked it by
> changing that to #define Int4 int; which I think is probably appropriate
> on most platforms. But this type should really be determined at
> configure time.
>
> Regards
>
>
> --
> Murad Nayal M.D. Ph.D.
> Department of Biochemistry and Molecular Biophysics
> College of Physicians and Surgeons of Columbia University
> 630 West 168th Street. New York, NY 10032
> Tel: 212-305-6884 Fax: 212-305-6926

> *** ./acinclude.m4.bk1 Wed Jun 14 13:30:52 2000
> --- ./acinclude.m4 Wed Jun 14 00:47:35 2000
> ***************
> *** 562,568 ****
> fi
> AC_MSG_CHECKING([for Qt])
>
> ! LIBQT="$LIBQT -lXext -lX11 $LIBSOCKET"
> ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
> qt_libraries=""
> qt_includes=""
> --- 562,568 ----
> fi
> AC_MSG_CHECKING([for Qt])
>
> ! LIBQT="$LIBQT -ljpeg -lSM -lICE -lXext -lX11 $LIBSOCKET"
> ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
> qt_libraries=""
> qt_includes=""
> ***************
> *** 693,699 ****
> AC_SUBST(QT_LDFLAGS)
> AC_PATH_QT_MOC
>
> ! LIB_QT='-lqt $(LIBPNG) -lXext $(LIB_X11)'
> AC_SUBST(LIB_QT)
>
> ])
> --- 693,699 ----
> AC_SUBST(QT_LDFLAGS)
> AC_PATH_QT_MOC
>
> ! LIB_QT='-lqt $(LIBPNG) -ljpeg -lSM -lICE -lXext $(LIB_X11)'
> AC_SUBST(LIB_QT)
>
> ])
> *** ./DataManager/Makefile.in.bk1 Wed Jun 14 13:28:47 2000
> --- ./DataManager/Makefile.in Tue Jun 13 13:25:30 2000
> ***************
> *** 176,182 ****
>
> @QT_TRUE(at)INCLUDES = -I../include @QT_INCLUDES@
>
> ! @QT_TRUE(at)DataManager_LDADD = @X_LDFLAGS@ @QT_LDFLAGS@ @LIB_QT@ ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la
>
> @QT_TRUE(at)DataManager_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la
>
> --- 176,182 ----
>
> @QT_TRUE(at)INCLUDES = -I../include @QT_INCLUDES@
>
> ! @QT_TRUE(at)DataManager_LDADD = @X_LDFLAGS@ @QT_LDFLAGS@ @USER_LDFLAGS@ @LIB_QT@ ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la
>
> @QT_TRUE(at)DataManager_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la
>
> *** ./ODBCConfig/Makefile.in.bk1 Tue Jun 13 13:18:55 2000
> --- ./ODBCConfig/Makefile.in Tue Jun 13 13:25:00 2000
> ***************
> *** 176,182 ****
>
> @QT_TRUE(at)INCLUDES = -I../include @QT_INCLUDES@ -DSYSTEM_FILE_PATH=\"@sysconfdir(at)\" -DDEFLIB_PATH=\"@libdir(at)\" $(INCLTDL)
>
> ! @QT_TRUE(at)ODBCConfig_LDADD = @X_LDFLAGS@ @QT_LDFLAGS@ @LIB_QT@ ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la
>
> @QT_TRUE(at)ODBCConfig_DEPENDANCIES = ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la
>
> --- 176,182 ----
>
> @QT_TRUE(at)INCLUDES = -I../include @QT_INCLUDES@ -DSYSTEM_FILE_PATH=\"@sysconfdir(at)\" -DDEFLIB_PATH=\"@libdir(at)\" $(INCLTDL)
>
> ! @QT_TRUE(at)ODBCConfig_LDADD = @X_LDFLAGS@ @QT_LDFLAGS@ @USER_LDFLAGS@ @LIB_QT@ ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la
>
> @QT_TRUE(at)ODBCConfig_DEPENDANCIES = ../odbcinst/libodbcinst.la ../extras/libodbcextraslc.la
>
> *** odbctest/Makefile.am.bk1 Wed Jun 14 15:16:22 2000
> --- odbctest/Makefile.am Wed Jun 14 15:16:37 2000
> ***************
> *** 6,11 ****
> --- 6,12 ----
>
> odbctest_LDADD = @X_LDFLAGS@ \
> @QT_LDFLAGS@ \
> + @USER_LDFLAGS@ \
> @LIB_QT@ \
> ../odbcinst/libodbcinst.la \
> ../DriverManager/libodbc.la
> *** ./DataManager/classLogin.cpp.bk1 Tue Jun 13 14:20:07 2000
> --- ./DataManager/classLogin.cpp Tue Jun 13 14:20:57 2000
> ***************
> *** 85,93 ****
> QMessageBox::warning( this, "Data Manager", szBuf);
> else
> /* END TIM */
> ! QMessageBox::warning( this, "Data Manager", "Login failed\n\nThis may
> ! be for one of these reasons;\n1. invalid ID and Password\n2. invalid Data
> ! Source config\n3. improper installation" );
> return;
> }
>
> --- 85,91 ----
> QMessageBox::warning( this, "Data Manager", szBuf);
> else
> /* END TIM */
> ! QMessageBox::warning( this, "Data Manager", "Login failed\n\nThis may be for one of these reasons;\n1. invalid ID and Password\n2. invalid Data Source config\n3. improper installation" );
> return;
> }
>
> *** ./DataManager/classISQL.cpp.bk1 Tue Jun 13 13:49:38 2000
> --- ./DataManager/classISQL.cpp Tue Jun 13 13:50:56 2000
> ***************
> *** 140,147 ****
> // CREATE A STATEMENT
> iRC = SQLAllocStmt( hDbc, &hStmt );
> if( SQL_SUCCESS != iRC )
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed:
> ! SQLAllocStmt " );
>
> if( SQL_SUCCESS != (iRC=SQLPrepare(hStmt,
> (SQLCHAR*)(txtSQL->text().data()), SQL_NTS)) )
> --- 140,146 ----
> // CREATE A STATEMENT
> iRC = SQLAllocStmt( hDbc, &hStmt );
> if( SQL_SUCCESS != iRC )
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLAllocStmt " );
>
> if( SQL_SUCCESS != (iRC=SQLPrepare(hStmt,
> (SQLCHAR*)(txtSQL->text().data()), SQL_NTS)) )
> ***************
> *** 151,158 ****
> if (retcode == SQL_SUCCESS)
> QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf);
> else
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed:
> ! SQLPrepare " );
> }
>
> // EXECUTE
> --- 150,156 ----
> if (retcode == SQL_SUCCESS)
> QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf);
> else
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLPrepare " );
> }
>
> // EXECUTE
> ***************
> *** 163,170 ****
> if (retcode == SQL_SUCCESS)
> QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf);
> else
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed:
> ! SQLExecute " );
> }
>
> // GET NUMBER OF ROWS AFFECTED
> --- 161,167 ----
> if (retcode == SQL_SUCCESS)
> QMessageBox::critical( (QWidget *)this, "Data Manager", szBuf);
> else
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLExecute " );
> }
>
> // GET NUMBER OF ROWS AFFECTED
> ***************
> *** 186,193 ****
> // FREE STATEMENT
> iRC = SQLFreeStmt( hStmt, SQL_DROP );
> if( SQL_SUCCESS != iRC )
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed:
> ! SQLFreeStmt " );
>
> pTabBar->setCurrentTab( 1 );
> txtResults->show();
> --- 183,189 ----
> // FREE STATEMENT
> iRC = SQLFreeStmt( hStmt, SQL_DROP );
> if( SQL_SUCCESS != iRC )
> ! QMessageBox::critical( (QWidget *)this, "Data Manager", "Failed: SQLFreeStmt " );
>
> pTabBar->setCurrentTab( 1 );
> txtResults->show();
> *** ./odbctest/odbctest.cpp.bk1 Tue Jun 13 14:33:54 2000
> --- ./odbctest/odbctest.cpp Tue Jun 13 14:34:23 2000
> ***************
> *** 687,693 ****
> return a.exec();
> }
>
> ! Handle::Handle( int t, SQLHANDLE h, QString desc = NULL, SQLHANDLE stmt = SQL_NULL_HANDLE )
> {
> type = t;
> handle = h;
> --- 687,693 ----
> return a.exec();
> }
>
> ! Handle::Handle( int t, SQLHANDLE h, QString desc, SQLHANDLE stmt)
> {
> type = t;
> handle = h;
> *** ./libltdl/ltdl.c.bk1 Sun Jun 11 23:35:11 2000
> --- ./libltdl/ltdl.c Sun Jun 11 23:35:34 2000
> ***************
> *** 210,218 ****
>
> /* dynamic linking with dlopen/dlsym */
>
> - #if HAVE_DLFCN_H
> # include <dlfcn.h>
> - #endif
>
> /*
> * GLOBAL is not a good thing for us, it breaks perl amonst others
> --- 210,216 ----
> *** ./Drivers/txt/SQLStatistics.c.bk1 Fri May 26 16:55:21 2000
> --- ./Drivers/txt/SQLStatistics.c Fri May 26 16:55:43 2000
> ***************
> *** 58,64 ****
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols( hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> --- 58,64 ----
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols((SQLHSTMT) hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> *** ./Drivers/txt/SQLColumns.c.bk1 Fri May 26 16:52:03 2000
> --- ./Drivers/txt/SQLColumns.c Fri May 26 16:51:41 2000
> ***************
> *** 61,67 ****
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg );
> return SQL_ERROR;
> }
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols( hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> --- 61,67 ----
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, hStmt->szSqlMsg );
> return SQL_ERROR;
> }
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols((SQLHSTMT) hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> *** ./Drivers/txt/SQLSpecialColumns.c.bk1 Fri May 26 16:54:45 2000
> --- ./Drivers/txt/SQLSpecialColumns.c Fri May 26 16:55:03 2000
> ***************
> *** 76,82 ****
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols( hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> --- 76,82 ----
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols((SQLHSTMT) hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> *** ./Drivers/txt/SQLTables.c.bk1 Fri May 26 16:56:02 2000
> --- ./Drivers/txt/SQLTables.c Fri May 26 16:56:42 2000
> ***************
> *** 55,61 ****
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols( hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> --- 55,61 ----
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols((SQLHSTMT) hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> *** ./Drivers/txt/SQLPrimaryKeys.c.bk1 Fri May 26 16:53:27 2000
> --- ./Drivers/txt/SQLPrimaryKeys.c Fri May 26 16:53:41 2000
> ***************
> *** 55,61 ****
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols( hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> --- 55,61 ----
> return SQL_ERROR;
> }
>
> ! hStmt->hStmtExtras->hBoundCols = _CreateBoundCols((SQLHSTMT) hStmt );
>
> logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO, "SQL_SUCCESS" );
> return SQL_SUCCESS;
> *** ./Drivers/template/SQLAllocStmt.c.bk1 Fri May 26 17:16:55 2000
> --- ./Drivers/template/SQLAllocStmt.c Fri May 26 17:18:17 2000
> ***************
> *** 62,68 ****
> (*phStmt)->pNext = NULL;
> (*phStmt)->pPrev = NULL;
> (*phStmt)->pszQuery = NULL;
> ! sprintf( (*phStmt)->szCursorName, "CUR_%08lX", *phStmt );
>
> /* ADD TO DBCs STATEMENT LIST */
>
> --- 65,71 ----
> (*phStmt)->pNext = NULL;
> (*phStmt)->pPrev = NULL;
> (*phStmt)->pszQuery = NULL;
> ! sprintf((char*) (*phStmt)->szCursorName, "CUR_%08lX", *phStmt );
>
> /* ADD TO DBCs STATEMENT LIST */
>
> *** ./Drivers/template/SQLFreeEnv.c.bk1 Fri May 26 17:19:48 2000
> --- ./Drivers/template/SQLFreeEnv.c Fri May 26 17:20:08 2000
> ***************
> *** 14,19 ****
> --- 14,22 ----
> **********************************************************************/
>
> #include "driver.h"
> +
> + SQLRETURN _FreeEnv(SQLHENV);
> +
> SQLRETURN SQLFreeEnv( SQLHENV hDrvEnv )
> {
> return _FreeEnv( hDrvEnv );
> *** ./Drivers/template/SQLFreeHandle.c.bk1 Fri May 26 17:21:17 2000
> --- ./Drivers/template/SQLFreeHandle.c Fri May 26 17:21:27 2000
> ***************
> *** 25,31 ****
> return _FreeConnect( (SQLHDBC)nHandle );
>
> case SQL_HANDLE_STMT:
> ! // return _FreeStmt( (SQLHSTMT)nHandle, 0 );
> return _FreeStmt( (SQLHSTMT)nHandle );
>
> case SQL_HANDLE_DESC:
> --- 25,31 ----
> return _FreeConnect( (SQLHDBC)nHandle );
>
> case SQL_HANDLE_STMT:
> ! /* return _FreeStmt( (SQLHSTMT)nHandle, 0 ); */
> return _FreeStmt( (SQLHSTMT)nHandle );
>
> case SQL_HANDLE_DESC:
> *** ./Drivers/PostgreSQL/environ.c.bk1 Fri May 26 15:14:24 2000
> --- ./Drivers/PostgreSQL/environ.c Fri May 26 15:35:46 2000
> ***************
> *** 425,431 ****
>
> /* Free any connections belonging to this environment */
> for (lf = 0; lf < MAX_CONNECTIONS; lf++) {
> ! if (conns[lf] && conns[lf]->henv == self)
> rv = rv && CC_Destructor(conns[lf]);
> }
>
> --- 425,431 ----
>
> /* Free any connections belonging to this environment */
> for (lf = 0; lf < MAX_CONNECTIONS; lf++) {
> ! if (conns[lf] && conns[lf]->henv == (HENV) self)
> rv = rv && CC_Destructor(conns[lf]);
> }
>
> ***************
> *** 459,465 ****
>
> for (i = 0; i < MAX_CONNECTIONS; i++) {
> if ( ! conns[i]) {
> ! conn->henv = self;
> conns[i] = conn;
>
> mylog(" added at i =%d, conn->henv = %u, conns[i]->henv = %u\n", i, conn->henv, conns[i]->henv);
> --- 459,465 ----
>
> for (i = 0; i < MAX_CONNECTIONS; i++) {
> if ( ! conns[i]) {
> ! conn->henv = (HENV) self;
> conns[i] = conn;
>
> mylog(" added at i =%d, conn->henv = %u, conns[i]->henv = %u\n", i, conn->henv, conns[i]->henv);
> *** ./Drivers/PostgreSQL/execute.c.bk1 Fri May 26 15:36:14 2000
> --- ./Drivers/PostgreSQL/execute.c Sun Jun 11 21:42:40 2000
> ***************
> *** 445,451 ****
>
> mylog("SQLCancel: SQLFreeStmt returned %d\n", result);
>
> ! SC_clear_error(hstmt);
> return SQL_SUCCESS;
> }
>
> --- 445,451 ----
>
> mylog("SQLCancel: SQLFreeStmt returned %d\n", result);
>
> ! SC_clear_error( (StatementClass *) hstmt);
> return SQL_SUCCESS;
> }
>
> ***************
> *** 728,734 ****
> }
> }
> else {
> ! current_param->EXEC_buffer = malloc(cbValue + 1);
> if ( ! current_param->EXEC_buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (2)";
> --- 728,734 ----
> }
> }
> else {
> ! current_param->EXEC_buffer = (char*) malloc(cbValue + 1);
> if ( ! current_param->EXEC_buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (2)";
> ***************
> *** 758,764 ****
> buffer = current_param->EXEC_buffer;
>
> if (cbValue == SQL_NTS) {
> ! buffer = realloc(buffer, strlen(buffer) + strlen(rgbValue) + 1);
> if ( ! buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (3)";
> --- 758,764 ----
> buffer = current_param->EXEC_buffer;
>
> if (cbValue == SQL_NTS) {
> ! buffer = (char*) realloc(buffer, strlen(buffer) + strlen(rgbValue) + 1);
> if ( ! buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (3)";
> ***************
> *** 784,790 ****
> mylog(" cbValue = %d, old_pos = %d, *used = %d\n", cbValue, old_pos, *current_param->EXEC_used);
>
> /* dont lose the old pointer in case out of memory */
> ! buffer = realloc(current_param->EXEC_buffer, *current_param->EXEC_used + 1);
> if ( ! buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (3)";
> --- 784,790 ----
> mylog(" cbValue = %d, old_pos = %d, *used = %d\n", cbValue, old_pos, *current_param->EXEC_used);
>
> /* dont lose the old pointer in case out of memory */
> ! buffer = (char*) realloc(current_param->EXEC_buffer, *current_param->EXEC_used + 1);
> if ( ! buffer) {
> stmt->errornumber = STMT_NO_MEMORY_ERROR;
> stmt->errormsg = "Out of memory in SQLPutData (3)";
> *** ./Drivers/PostgreSQL/info.c.bk1 Fri May 26 15:39:45 2000
> --- ./Drivers/PostgreSQL/info.c Fri May 26 15:44:56 2000
> ***************
> *** 1028,1034 ****
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 1028,1034 ----
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 1149,1155 ****
> result = PG__SQLFetch(htbl_stmt);
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 1149,1155 ----
> result = PG__SQLFetch(htbl_stmt);
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 1240,1246 ****
> result = PG__SQLExecDirect(hcol_stmt, columns_query,
> strlen(columns_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(hcol_stmt);
> stmt->errornumber = col_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> --- 1240,1246 ----
> result = PG__SQLExecDirect(hcol_stmt, columns_query,
> strlen(columns_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) hcol_stmt);
> stmt->errornumber = col_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> ***************
> *** 1470,1476 ****
>
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg(hcol_stmt);
> stmt->errornumber = col_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> --- 1470,1476 ----
>
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) hcol_stmt);
> stmt->errornumber = col_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> ***************
> *** 1760,1766 ****
> result = PG__SQLFetch(hcol_stmt);
> }
> if(result != SQL_NO_DATA_FOUND || total_columns == 0) {
> ! stmt->errormsg = SC_create_errormsg(hcol_stmt); /*// "Couldn't get column names in SQLStatistics."; */
> stmt->errornumber = col_stmt->errornumber;
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> goto SEEYA;
> --- 1760,1766 ----
> result = PG__SQLFetch(hcol_stmt);
> }
> if(result != SQL_NO_DATA_FOUND || total_columns == 0) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) hcol_stmt); /*// "Couldn't get column names in SQLStatistics."; */
> stmt->errornumber = col_stmt->errornumber;
> PG__SQLFreeStmt(hcol_stmt, SQL_DROP);
> goto SEEYA;
> ***************
> *** 1784,1790 ****
>
> result = PG__SQLExecDirect(hindx_stmt, index_query, strlen(index_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(hindx_stmt); /*// "Couldn't execute index query (w/SQLExecDirect) in SQLStatistics."; */
> stmt->errornumber = indx_stmt->errornumber;
> PG__SQLFreeStmt(hindx_stmt, SQL_DROP);
> goto SEEYA;
> --- 1784,1790 ----
>
> result = PG__SQLExecDirect(hindx_stmt, index_query, strlen(index_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) hindx_stmt); /*// "Couldn't execute index query (w/SQLExecDirect) in SQLStatistics."; */
> stmt->errornumber = indx_stmt->errornumber;
> PG__SQLFreeStmt(hindx_stmt, SQL_DROP);
> goto SEEYA;
> ***************
> *** 1924,1930 ****
> result = PG__SQLFetch(hindx_stmt);
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg(hindx_stmt); /*// "SQLFetch failed in SQLStatistics."; */
> stmt->errornumber = indx_stmt->errornumber;
> PG__SQLFreeStmt(hindx_stmt, SQL_DROP);
> goto SEEYA;
> --- 1924,1930 ----
> result = PG__SQLFetch(hindx_stmt);
> }
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) hindx_stmt); /*// "SQLFetch failed in SQLStatistics."; */
> stmt->errornumber = indx_stmt->errornumber;
> PG__SQLFreeStmt(hindx_stmt, SQL_DROP);
> goto SEEYA;
> ***************
> *** 2076,2082 ****
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2076,2082 ----
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 2120,2126 ****
> }
>
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2120,2126 ----
> }
>
> if(result != SQL_NO_DATA_FOUND) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 2272,2278 ****
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2272,2278 ----
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 2314,2320 ****
> return SQL_SUCCESS;
>
> if(result != SQL_SUCCESS) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2314,2320 ----
> return SQL_SUCCESS;
>
> if(result != SQL_SUCCESS) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 2447,2453 ****
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2447,2453 ----
>
> result = PG__SQLExecDirect(htbl_stmt, tables_query, strlen(tables_query));
> if((result != SQL_SUCCESS) && (result != SQL_SUCCESS_WITH_INFO)) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> ***************
> *** 2499,2505 ****
> return SQL_SUCCESS;
>
> if(result != SQL_SUCCESS) {
> ! stmt->errormsg = SC_create_errormsg(htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> --- 2499,2505 ----
> return SQL_SUCCESS;
>
> if(result != SQL_SUCCESS) {
> ! stmt->errormsg = SC_create_errormsg((StatementClass *) htbl_stmt);
> stmt->errornumber = tbl_stmt->errornumber;
> SC_log_error(func, "", stmt);
> PG__SQLFreeStmt(htbl_stmt, SQL_DROP);
> *** ./Drivers/PostgreSQL/psqlodbc.h.bk1 Mon Jun 12 01:45:27 2000
> --- ./Drivers/PostgreSQL/psqlodbc.h Mon Jun 12 01:45:39 2000
> ***************
> *** 18,24 ****
> #include <stdio.h> /* for FILE* pointers: see GLOBAL_VALUES */
>
> #ifndef WIN32
> ! #define Int4 long int
> #define UInt4 unsigned int
> #define Int2 short
> #define UInt2 unsigned short
> --- 18,24 ----
> #include <stdio.h> /* for FILE* pointers: see GLOBAL_VALUES */
>
> #ifndef WIN32
> ! #define Int4 int
> #define UInt4 unsigned int
> #define Int2 short
> #define UInt2 unsigned short

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Lockhart 2000-06-15 14:29:36 Re: [HACKERS] info on unixODBC/Postgres driver port to IRIX 6.5.7 64bit
Previous Message Ian Grant 2000-06-15 09:45:35 Re: large object seek/write bug

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-06-15 14:27:39 AW: AW: Big 7.1 open items
Previous Message Thomas Lockhart 2000-06-15 14:14:47 Re: Re: Big 7.1 open items

Browse pgsql-ports by date

  From Date Subject
Next Message Thomas Lockhart 2000-06-15 14:29:36 Re: [HACKERS] info on unixODBC/Postgres driver port to IRIX 6.5.7 64bit
Previous Message Bruce Momjian 2000-06-15 13:43:54 Re: BSDI regression tests