File tree Expand file tree Collapse file tree 5 files changed +21
-5
lines changed Expand file tree Collapse file tree 5 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ CC_connect(ConnectionClass *self, char do_password)
610
610
int areq = -1 ;
611
611
int beresp ;
612
612
static char msgbuffer [ERROR_MSG_LENGTH ];
613
- char salt [5 ];
613
+ char salt [5 ], notice [ 512 ] ;
614
614
static char * func = "CC_connect" ;
615
615
616
616
#ifdef MULTIBYTE
@@ -893,6 +893,9 @@ CC_connect(ConnectionClass *self, char do_password)
893
893
case 'Z' : /* Backend is ready for new query (6.4) */
894
894
ReadyForQuery = TRUE;
895
895
break ;
896
+ case 'N' : /* Notices may come */
897
+ while (SOCK_get_string (sock , notice , sizeof (notice ) - 1 )) ;
898
+ break ;
896
899
default :
897
900
self -> errormsg = "Unexpected protocol character during authentication" ;
898
901
self -> errornumber = CONN_INVALID_AUTHENTICATION ;
Original file line number Diff line number Diff line change 5
5
*
6
6
* Comments: See "notice.txt" for copyright and license information.
7
7
*
8
- * $Id: descriptor.h,v 1.3 2002/04/02 10:50:44 inoue Exp $
8
+ * $Id: descriptor.h,v 1.4 2002/04/10 08:18:54 inoue Exp $
9
9
*
10
10
*/
11
11
17
17
typedef struct
18
18
{
19
19
COL_INFO * col_info ; /* cached SQLColumns info for this table */
20
- char schema [MAX_TABLE_LEN + 1 ];
20
+ char schema [MAX_SCHEMA_LEN + 1 ];
21
21
char name [MAX_TABLE_LEN + 1 ];
22
22
char alias [MAX_TABLE_LEN + 1 ];
23
23
} TABLE_INFO ;
Original file line number Diff line number Diff line change @@ -342,6 +342,8 @@ PGAPI_GetInfo(
342
342
case SQL_MAX_OWNER_NAME_LEN : /* ODBC 1.0 */
343
343
len = 2 ;
344
344
value = 0 ;
345
+ if (conn -> schema_support )
346
+ value = MAX_SCHEMA_LEN ;
345
347
break ;
346
348
347
349
case SQL_MAX_PROCEDURE_NAME_LEN : /* ODBC 1.0 */
@@ -484,12 +486,21 @@ PGAPI_GetInfo(
484
486
break ;
485
487
486
488
case SQL_OWNER_TERM : /* ODBC 1.0 */
487
- p = "owner" ;
489
+ if (conn -> schema_support )
490
+ p = "schema" ;
491
+ else
492
+ p = "owner" ;
488
493
break ;
489
494
490
495
case SQL_OWNER_USAGE : /* ODBC 2.0 */
491
496
len = 4 ;
492
497
value = 0 ;
498
+ if (conn -> schema_support )
499
+ value = SQL_OU_DML_STATEMENTS
500
+ | SQL_OU_TABLE_DEFINITION
501
+ | SQL_OU_INDEX_DEFINITION
502
+ | SQL_OU_PRIVILEGE_DEFINITION
503
+ ;
493
504
break ;
494
505
495
506
case SQL_POS_OPERATIONS : /* ODBC 2.0 */
Original file line number Diff line number Diff line change 5
5
*
6
6
* Comments: See "notice.txt" for copyright and license information.
7
7
*
8
- * $Id: psqlodbc.h,v 1.63 2002/04/02 10:50:49 inoue Exp $
8
+ * $Id: psqlodbc.h,v 1.64 2002/04/10 08:18:53 inoue Exp $
9
9
*
10
10
*/
11
11
@@ -124,6 +124,7 @@ typedef UInt4 Oid;
124
124
#define BYTELEN 8
125
125
#define VARHDRSZ sizeof(Int4)
126
126
127
+ #define MAX_SCHEMA_LEN 32
127
128
#define MAX_TABLE_LEN 32
128
129
#define MAX_COLUMN_LEN 32
129
130
#define MAX_CURSOR_LEN 32
Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ SC_Constructor(void)
301
301
rv -> inaccurate_result = FALSE;
302
302
rv -> miscinfo = 0 ;
303
303
rv -> updatable = FALSE;
304
+ rv -> error_recsize = -1 ;
304
305
}
305
306
return rv ;
306
307
}
You can’t perform that action at this time.
0 commit comments