patch for cleanup protocol

patch for cleanup protocol

am 19.12.2005 23:06:52 von Ludek Finstrle

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello,

protocol option is no longer used with libpq driver version.
So I clean up the code. I try change both languages (English and Japanese).
I didn't sure how to clean up faq.html so I don't do it.

Please review and comment

Luf

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: attachment; filename="psqlodbc-without_protocol.diff"
Content-Transfer-Encoding: quoted-printable

diff -c psqlodbc.orig\connection.c psqlodbc.full\connection.c
*** psqlodbc.orig\connection.c Sat Dec 10 08:39:31 2005
--- psqlodbc.full\connection.c Mon Dec 19 23:33:09 2005
***************
*** 112,119 ****
memcpy(&ci->drivers, &globals, sizeof(globals));
getDSNinfo(ci, CONN_OVERWRITE);
logs_on_off(1, ci->drivers.debug, ci->drivers.commlog);
- /* initialize pg_version from connInfo.protocol */
- CC_initialize_pg_version(conn);
=20
/*
* override values from DSN info with UID and authStr(pwd) This only
--- 112,117 ----
***************
*** 737,772 ****
qlog(" [ Large Object oid =3D %d ]\n", self->lobj_type);
=20
result =3D PGAPI_FreeStmt(hstmt, SQL_DROP);
- }
-=20
-=20
- /*
- * This function initializes the version of PostgreSQL from
- * connInfo.protocol that we're connected to.
- * h-inoue 01-2-2001
- */
- void
- CC_initialize_pg_version(ConnectionClass *self)
- {
- strcpy(self->pg_version, self->connInfo.protocol);
- if (PROTOCOL_62(&self->connInfo))
- {
- self->pg_version_number =3D (float) 6.2;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 2;
- }
- else if (PROTOCOL_63(&self->connInfo))
- {
- self->pg_version_number =3D (float) 6.3;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 3;
- }
- else
- {
- self->pg_version_number =3D (float) 6.4;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 4;
- }
}
=20
=20
--- 735,740 ----
diff -c psqlodbc.orig\connection.h psqlodbc.full\connection.h
*** psqlodbc.orig\connection.h Wed Nov 30 13:44:12 2005
--- psqlodbc.full\connection.h Mon Dec 19 23:33:09 2005
***************
*** 171,183 ****
#define ARGV_SIZE 64
#define USRNAMEDATALEN 16
=20
- typedef unsigned int ProtocolVersion;
-=20
- #define PG_PROTOCOL(major, minor) (((major) << 16) | (minor))
- #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
- #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
- #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
-=20
=20
typedef enum
{
--- 171,176 ----
***************
*** 189,199 ****
* statement */
} CONN_Status;
=20
- /* Transferred from pqcomm.h: */
-=20
-=20
- typedef ProtocolVersion MsgType;
-=20
/* Structure to hold all the connection attributes for a specific
connection (used for both registry and file, DSN and DRIVER) */
=20
--- 182,187 ----
***************
*** 207,213 ****
char username[MEDIUM_REGISTRY_LEN];
char password[MEDIUM_REGISTRY_LEN];
char conn_settings[LARGE_REGISTRY_LEN];
- char protocol[SMALL_REGISTRY_LEN];
char port[SMALL_REGISTRY_LEN];
char sslmode[MEDIUM_REGISTRY_LEN];
char onlyread[SMALL_REGISTRY_LEN];
--- 195,200 ----
***************
*** 231,242 ****
} ConnInfo;
=20
=20
- /* Macro to determine is the connection using 6.2 protocol? */
- #define PROTOCOL_62(conninfo_) (strncmp((conninfo_)->protocol, PG62, s=
trlen(PG62)) == 0)
-=20
- /* Macro to determine is the connection using 6.3 protocol? */
- #define PROTOCOL_63(conninfo_) (strncmp((conninfo_)->protocol, PG63, s=
trlen(PG63)) == 0)
-=20
/*
* Macros to compare the server's version with a specified version
* 1st parameter: pointer to a ConnectionClass object
--- 218,223 ----
***************
*** 390,396 ****
char CC_send_settings(ConnectionClass *self);
void CC_lookup_lo(ConnectionClass *conn);
void CC_lookup_pg_version(ConnectionClass *conn);
- void CC_initialize_pg_version(ConnectionClass *conn);
void CC_log_error(const char *func, const char *desc, const Connection=
Class *self);
int CC_get_max_query_len(const ConnectionClass *self);
int CC_send_cancel_request(const ConnectionClass *conn);
--- 371,376 ----
diff -c psqlodbc.orig\dlg_specific.c psqlodbc.full\dlg_specific.c
*** psqlodbc.orig\dlg_specific.c Wed Nov 30 13:44:16 2005
--- psqlodbc.full\dlg_specific.c Mon Dec 19 23:33:09 2005
***************
*** 65,72 ****
";%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s =3D%d;%=
s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D %d;%s=3D%d;%s=
=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%s;%s=3D%d;%s=3D% d;%s=3D%d;%s=3D=
%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d",
INI_READONLY,
ci->onlyread,
- INI_PROTOCOL,
- ci->protocol,
INI_FAKEOIDINDEX,
ci->fake_oid_index,
INI_SHOWOIDCOLUMN,
--- 65,70 ----
***************
*** 137,148 ****
flag |=3D BIT_LFCONVERSION;
if (ci->drivers.unique_index)
flag |=3D BIT_UNIQUEINDEX;
- if (strncmp(ci->protocol, PG64, strlen(PG64)) == 0)
- flag |=3D BIT_PROTOCOL_64;
- else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0)
- flag |=3D BIT_PROTOCOL_63;
- else if (strncmp(ci->protocol, "7.4", 3) == 0)
- flag |=3D (BIT_PROTOCOL_63 | BIT_PROTOCOL_64);
switch (ci->drivers.unknown_sizes)
{
case UNKNOWNS_AS_DONTKNOW:
--- 135,140 ----
***************
*** 231,242 ****
if (count < 4)
return;
ci->drivers.unique_index =3D (char)((flag & BIT_UNIQUEINDEX) !=3D 0);
- if ((flag & BIT_PROTOCOL_64) !=3D 0)
- strcpy(ci->protocol, PG64);
- else if ((flag & BIT_PROTOCOL_63) !=3D 0)
- strcpy(ci->protocol, PG63);
- else
- strcpy(ci->protocol, PG62);
if ((flag & BIT_UNKNOWN_DONTKNOW) !=3D 0)
ci->drivers.unknown_sizes =3D UNKNOWNS_AS_DONTKNOW;
else if ((flag & BIT_UNKNOWN_ASMAX) !=3D 0)
--- 223,228 ----
***************
*** 293,301 ****
else if (stricmp(attribute, INI_READONLY) == 0 || stricmp(attribut=
e, "A0") == 0)
strcpy(ci->onlyread, value);
=20
- else if (stricmp(attribute, INI_PROTOCOL) == 0 || stricmp(attribut=
e, "A1") == 0)
- strcpy(ci->protocol, value);
-=20
else if (stricmp(attribute, INI_SHOWOIDCOLUMN) == 0 || stricmp(att=
ribute, "A3") == 0)
strcpy(ci->show_oid_column, value);
=20
--- 279,284 ----
***************
*** 332,338 ****
else if (stricmp(attribute, "CX") == 0)
unfoldCXAttribute(ci, value);
=20
! mylog("copyAttributes: DSN=3D'%s',server=3D'%s',dbase=3D'%s',user=3D'%=
s',passwd=3D'%s',port=3D'%s',sslmode=3D'%s',onlyread=3D'%s', protocol=3D'%=
s',conn_settings=3D'%s',disallow_premature=3D%d)\n", ci->dsn, ci->server,=
ci->database, ci->username, ci->password ? "xxxxx" : "", ci->port, ci->s=
slmode, ci->onlyread, ci->protocol, ci->conn_settings, ci->disallow_prema=
ture);
}
=20
void
--- 315,321 ----
else if (stricmp(attribute, "CX") == 0)
unfoldCXAttribute(ci, value);
=20
! mylog("copyAttributes: DSN=3D'%s',server=3D'%s',dbase=3D'%s',user=3D'%=
s',passwd=3D'%s',port=3D'%s',sslmode=3D'%s',onlyread=3D'%s', conn_settings=
=3D'%s',disallow_premature=3D%d)\n", ci->dsn, ci->server, ci->database, c=
i->username, ci->password ? "xxxxx" : "", ci->port, ci->sslmode, ci->only=
read, ci->conn_settings, ci->disallow_premature);
}
=20
void
***************
*** 410,418 ****
if (ci->onlyread[0] == '\0')
sprintf(ci->onlyread, "%d", globals.onlyread);
=20
- if (ci->protocol[0] == '\0')
- strcpy(ci->protocol, globals.protocol);
-=20
if (ci->fake_oid_index[0] == '\0')
sprintf(ci->fake_oid_index, "%d", DEFAULT_FAKEOIDINDEX);
=20
--- 393,398 ----
***************
*** 517,525 ****
if (ci->show_system_tables[0] == '\0' || overwrite)
SQLGetPrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, "", ci->show_sy=
stem_tables, sizeof(ci->show_system_tables), ODBC_INI);
=20
- if (ci->protocol[0] == '\0' || overwrite)
- SQLGetPrivateProfileString(DSN, INI_PROTOCOL, "", ci->protocol, sizeo=
f(ci->protocol), ODBC_INI);
-=20
if (ci->conn_settings[0] == '\0' || overwrite)
{
SQLGetPrivateProfileString(DSN, INI_CONNSETTINGS, "", encoded_conn_se=
ttings, sizeof(encoded_conn_settings), ODBC_INI);
--- 497,502 ----
***************
*** 598,606 ****
ci->database,
ci->username,
ci->password ? "xxxxx" : "");
! qlog(" onlyread=3D'%s',protocol=3D'%s',showoid=3D'%s',fakeoid=
index=3D'%s',showsystable=3D'%s'\n",
ci->onlyread,
- ci->protocol,
ci->show_oid_column,
ci->fake_oid_index,
ci->show_system_tables);
--- 575,582 ----
ci->database,
ci->username,
ci->password ? "xxxxx" : "");
! qlog(" onlyread=3D'%s',showoid=3D'%s',fakeoidindex=3D'%s',sho=
wsystable=3D'%s'\n",
ci->onlyread,
ci->show_oid_column,
ci->fake_oid_index,
ci->show_system_tables);
***************
*** 776,786 ****
ODBC_INI);
=20
SQLWritePrivateProfileString(DSN,
- INI_PROTOCOL,
- ci->protocol,
- ODBC_INI);
-=20
- SQLWritePrivateProfileString(DSN,
INI_CONNSETTINGS,
encoded_conn_settings,
ODBC_INI);
--- 752,757 ----
***************
*** 1021,1036 ****
else
comval->onlyread =3D DEFAULT_READONLY;
=20
- /*
- * Default state for future DSN's protocol attribute This isn't a
- * real driver option YET. This is more intended for
- * customization from the install.
- */
- SQLGetPrivateProfileString(section, INI_PROTOCOL, "@@@",
- temp, sizeof(temp), filename);
- if (strcmp(temp, "@@@"))
- strcpy(comval->protocol, temp);
- else
- strcpy(comval->protocol, DEFAULT_PROTOCOL);
}
}
--- 992,996 ----
diff -c psqlodbc.orig\dlg_specific.h psqlodbc.full\dlg_specific.h
*** psqlodbc.orig\dlg_specific.h Wed Nov 30 13:44:16 2005
--- psqlodbc.full\dlg_specific.h Mon Dec 19 23:33:09 2005
***************
*** 55,61 ****
#define INI_SOCKET "Socket" /* Socket buffer size */
#define INI_READONLY "ReadOnly" /* Database is read only */
#define INI_COMMLOG "CommLog" /* Communication to backend logging */
- #define INI_PROTOCOL "Protocol" /* What protocol (6.2) */
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */
#define INI_KSQO "Ksqo" /* Keyset query optimization */
#define INI_CONNSETTINGS "ConnSettings" /* Anything to send to backend=
on successful connection */
--- 55,60 ----
***************
*** 96,103 ****
#define BIT_UPDATABLECURSORS (1L<<1)
#define BIT_DISALLOWPREMATURE (1L<<2)
#define BIT_UNIQUEINDEX (1L<<3)
- #define BIT_PROTOCOL_63 (1L<<4)
- #define BIT_PROTOCOL_64 (1L<<5)
#define BIT_UNKNOWN_DONTKNOW (1L<<6)
#define BIT_UNKNOWN_ASMAX (1L<<7)
#define BIT_OPTIMIZER (1L<<8)
--- 95,100 ----
***************
*** 127,133 ****
#define DEFAULT_PORT "5432"
#define DEFAULT_SSLMODE "prefer"
#define DEFAULT_READONLY 0
- #define DEFAULT_PROTOCOL "6.4" /* the latest protocol is the default *=
/
#define DEFAULT_USEDECLAREFETCH 0
#define DEFAULT_TEXTASLONGVARCHAR 1
#define DEFAULT_UNKNOWNSASLONGVARCHAR 0
--- 124,129 ----
diff -c psqlodbc.orig\dlg_wingui.c psqlodbc.full\dlg_wingui.c
*** psqlodbc.orig\dlg_wingui.c Wed Nov 30 13:44:17 2005
--- psqlodbc.full\dlg_wingui.c Mon Dec 19 23:33:09 2005
***************
*** 455,469 ****
/* Readonly */
CheckDlgButton(hdlg, DS_READONLY, atoi(ci->onlyread));
=20
- /* Protocol */
- if (strncmp(ci->protocol, PG62, strlen(PG62)) == 0)
- CheckDlgButton(hdlg, DS_PG62, 1);
- else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0)
- CheckDlgButton(hdlg, DS_PG63, 1);
- else
- /* latest */
- CheckDlgButton(hdlg, DS_PG64, 1);
-=20
/* Int8 As */
switch (ci->int8_as)
{
--- 455,460 ----
***************
*** 523,537 ****
=20
/* Readonly */
sprintf(ci->onlyread, "%d", IsDlgButtonChecked(hdlg, DS_READONLY))=
;
-=20
- /* Protocol */
- if (IsDlgButtonChecked(hdlg, DS_PG62))
- strcpy(ci->protocol, PG62);
- else if (IsDlgButtonChecked(hdlg, DS_PG63))
- strcpy(ci->protocol, PG63);
- else
- /* latest */
- strcpy(ci->protocol, PG64);
=20
/* Int8 As */
if (IsDlgButtonChecked(hdlg, DS_INT8_AS_DEFAULT))
--- 514,519 ----
diff -c psqlodbc.orig\drvconn.c psqlodbc.full\drvconn.c
*** psqlodbc.orig\drvconn.c Wed Nov 30 13:44:17 2005
--- psqlodbc.full\drvconn.c Mon Dec 19 23:33:09 2005
***************
*** 141,148 ****
=20
/* Fill in any default parameters if they are not there. */
getDSNdefaults(ci);
- /* initialize pg_version */
- CC_initialize_pg_version(conn);
salt[0] =3D '\0';
=20
#ifdef WIN32
--- 141,146 ----
diff -c psqlodbc.orig\psqlodbc.h psqlodbc.full\psqlodbc.h
*** psqlodbc.orig\psqlodbc.h Wed Nov 30 13:44:32 2005
--- psqlodbc.full\psqlodbc.h Mon Dec 19 23:33:09 2005
***************
*** 202,213 ****
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
=20
- #define PG62 "6.2" /* "Protocol" key setting
- * to force Postgres 6.2 */
- #define PG63 "6.3" /* "Protocol" key setting
- * to force postgres 6.3 */
- #define PG64 "6.4"
-=20
typedef struct ConnectionClass_ ConnectionClass;
typedef struct StatementClass_ StatementClass;
typedef struct QResultClass_ QResultClass;
--- 202,207 ----
***************
*** 252,258 ****
char cancel_as_freestmt;
char extra_systable_prefixes[MEDIUM_REGISTRY_LEN];
char conn_settings[LARGE_REGISTRY_LEN];
- char protocol[SMALL_REGISTRY_LEN];
} GLOBAL_VALUES;
=20
typedef struct StatementOptions_
--- 246,251 ----
diff -c psqlodbc.orig\psqlodbc.rc psqlodbc.full\psqlodbc.rc
*** psqlodbc.orig\psqlodbc.rc Sat Dec 10 08:39:31 2005
--- psqlodbc.full\psqlodbc.rc Mon Dec 19 23:33:09 2005
***************
*** 163,183 ****
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "=83vƒ=83g=83Rƒ‹=83o=81|=83Wƒ‡ƒ“",=
IDC_STATIC,5,128,296,25
! CONTROL ">=3D 6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS=
_GROUP,
! 18,139,49,10
! CONTROL "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 87,139,26,10
! CONTROL "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 140,140,26,10
! GROUPBOX "OID =83I=83v=83Vƒ‡ƒ“",IDC_STATIC,5,158,296=
,25
CONTROL "=83Jƒ‰ƒ€—ñ=95\Ž¦(&C)",DS_SHOWOIDCO=
LUMN,"Button",
! BS_AUTOCHECKBOX | WS_GROUP,16,169,72,10
CONTROL "=83Cƒ“=83f=83b=83N=83X‚ð‘•‚¤(&I)",=
DS_FAKEOIDINDEX,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,107,169,95,10
! LTEXT "Ú‘±Žž Ý’è:(&S)",IDC_STATIC=
,13,192,69,10,NOT=20
WS_GROUP
! EDITTEXT DS_CONNSETTINGS,90,191,211,27,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | N=
OT=20
WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,5,224,50,14,WS_GROUP
--- 163,176 ----
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "OID =83I=83v=83Vƒ‡ƒ“",IDC_STATIC,5,128,296=
,25
CONTROL "=83Jƒ‰ƒ€—ñ=95\Ž¦(&C)",DS_SHOWOIDCO=
LUMN,"Button",
! BS_AUTOCHECKBOX | WS_GROUP,16,139,72,10
CONTROL "=83Cƒ“=83f=83b=83N=83X‚ð‘•‚¤(&I)",=
DS_FAKEOIDINDEX,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,107,139,95,10
! LTEXT "Ú‘±Žž Ý’è:(&S)",IDC_STATIC=
,13,159,69,10,NOT=20
WS_GROUP
! EDITTEXT DS_CONNSETTINGS,90,160,211,58,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | N=
OT=20
WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,5,224,50,14,WS_GROUP
***************
*** 509,528 ****
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "Protocol",IDC_STATIC,5,126,277,25
! CONTROL ">=3D 6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS=
_GROUP,
! 44,137,49,10
! CONTROL "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 117,137,26,10
! CONTROL "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 191,137,26,10
! GROUPBOX "OID Options",IDC_STATIC,5,155,277,25
CONTROL "Show &Column",DS_SHOWOIDCOLUMN,"Button",BS_AUTOCHE=
CKBOX |=20
! WS_GROUP | WS_TABSTOP,53,167,59,10
CONTROL "Fake &Index",DS_FAKEOIDINDEX,"Button",BS_AUTOCHECK=
BOX |=20
! WS_GROUP | WS_TABSTOP,155,166,51,10
! LTEXT "Connect\n&Settings",IDC_STATIC,5,188,62,17
! EDITTEXT DS_CONNSETTINGS,47,188,235,27,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,121,220,50,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,231,220,50,14
--- 502,514 ----
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "OID Options",IDC_STATIC,5,127,277,25
CONTROL "Show &Column",DS_SHOWOIDCOLUMN,"Button",BS_AUTOCHE=
CKBOX |=20
! WS_GROUP | WS_TABSTOP,53,138,59,10
CONTROL "Fake &Index",DS_FAKEOIDINDEX,"Button",BS_AUTOCHECK=
BOX |=20
! WS_GROUP | WS_TABSTOP,155,138,51,10
! LTEXT "Connect\n&Settings",IDC_STATIC,5,160,62,17
! EDITTEXT DS_CONNSETTINGS,47,160,235,55,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,121,220,50,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,231,220,50,14
diff -c psqlodbc.orig\resource.h psqlodbc.full\resource.h
*** psqlodbc.orig\resource.h Wed Nov 30 13:44:33 2005
--- psqlodbc.full\resource.h Mon Dec 19 23:33:09 2005
***************
*** 34,40 ****
#define DS_SHOWOIDCOLUMN 1012
#define DS_FAKEOIDINDEX 1013
#define DRV_COMMLOG 1014
- #define DS_PG62 1016
#define IDC_DATASOURCE 1018
#define DRV_OPTIMIZER 1019
#define DS_CONNSETTINGS 1020
--- 34,39 ----
***************
*** 62,69 ****
#define DRV_CANCELASFREESTMT 1053
#define IDC_OPTIONS 1054
#define DRV_KSQO 1055
- #define DS_PG64 1057
- #define DS_PG63 1058
#define DRV_OR_DSN 1059
#define DRV_DEBUG 1060
#define DS_DISALLOWPREMATURE 1061
--- 61,66 ----

--sm4nu43k4a2Rpi4c
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

--sm4nu43k4a2Rpi4c--

Re: patch for cleanup protocol

am 20.12.2005 09:15:15 von Dave Page

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 19 December 2005 22:07
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] patch for cleanup protocol
>=20
> Hello,
>=20
> protocol option is no longer used with libpq driver version.
> So I clean up the code. I try change both languages (English=20
> and Japanese).
> I didn't sure how to clean up faq.html so I don't do it.
>=20
> Please review and comment

Looks fine to me (haven't tested it though) - however, please add a
prominent note in dlg_specific.c to remind us not to reuse old parameter
names/aliases in the future unless it's for the same purpose they were
originally used for, and list those names of course (well, name in this
first case).

Thanks, Dave.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: patch for cleanup protocol

am 20.12.2005 09:42:50 von tomas

Ludek Finstrle writes:

> Hello,
>
> protocol option is no longer used with libpq driver version.
> So I clean up the code. I try change both languages (English and Japanese).
> I didn't sure how to clean up faq.html so I don't do it.
>
> Please review and comment

I'm not qualified to tell if the changes are correct, but I just
noticed this one thing:

> diff -c psqlodbc.orig\dlg_specific.c psqlodbc.full\dlg_specific.c
> *** psqlodbc.orig\dlg_specific.c Wed Nov 30 13:44:16 2005
> --- psqlodbc.full\dlg_specific.c Mon Dec 19 23:33:09 2005
> ***************
> *** 65,72 ****
> ";%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%d;%s=%d;%s=% d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=% d;%s=%d;%s=%d;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=% d;%s=%d",
> INI_READONLY,
> ci->onlyread,
> - INI_PROTOCOL,
> - ci->protocol,
> INI_FAKEOIDINDEX,
> ci->fake_oid_index,
> INI_SHOWOIDCOLUMN,
> --- 65,70 ----

If you remove these arguments, you have to remove the corresponding
(second from start) "%s=%s" pair from the format string, otherwise
it'll use the wrong variables for the %d's further on.


Tomas

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Re: patch for cleanup protocol

am 20.12.2005 11:23:20 von Ludek Finstrle

--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

> I'm not qualified to tell if the changes are correct, but I just
> noticed this one thing:
>
> > ";%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%s;%s=%d;%s=%d;%s=% d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=% d;%s=%d;%s=%d;%s=%s;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=%d;%s=% d;%s=%d",
> > INI_READONLY,
> > ci->onlyread,
> > - INI_PROTOCOL,
> > - ci->protocol,

....

> If you remove these arguments, you have to remove the corresponding
> (second from start) "%s=%s" pair from the format string, otherwise
> it'll use the wrong variables for the %d's further on.

Yes. Very good point. Thank you Tomas.

> Looks fine to me (haven't tested it though) - however, please add a

I test it. It works good for me. But there can be sill bug (I hope there
is no bug).

> prominent note in dlg_specific.c to remind us not to reuse old parameter
> names/aliases in the future unless it's for the same purpose they were
> originally used for, and list those names of course (well, name in this
> first case).

I try add some note but I don't know if it fits you expectation. If it's
not good for you please change it and send me patch which solve it.

Second try ... (I break in this two advices)
I forgot. I made this patch againist CVS head.

Please review and comment

Luf

--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: attachment; filename="psqlodbc-without_protocol.diff"
Content-Transfer-Encoding: quoted-printable

diff -c psqlodbc.orig\connection.c psqlodbc.cleanup\connection.c
*** psqlodbc.orig\connection.c Sat Dec 10 08:39:31 2005
--- psqlodbc.cleanup\connection.c Mon Dec 19 23:03:37 2005
***************
*** 112,119 ****
memcpy(&ci->drivers, &globals, sizeof(globals));
getDSNinfo(ci, CONN_OVERWRITE);
logs_on_off(1, ci->drivers.debug, ci->drivers.commlog);
- /* initialize pg_version from connInfo.protocol */
- CC_initialize_pg_version(conn);
=20
/*
* override values from DSN info with UID and authStr(pwd) This only
--- 112,117 ----
***************
*** 737,772 ****
qlog(" [ Large Object oid =3D %d ]\n", self->lobj_type);
=20
result =3D PGAPI_FreeStmt(hstmt, SQL_DROP);
- }
-=20
-=20
- /*
- * This function initializes the version of PostgreSQL from
- * connInfo.protocol that we're connected to.
- * h-inoue 01-2-2001
- */
- void
- CC_initialize_pg_version(ConnectionClass *self)
- {
- strcpy(self->pg_version, self->connInfo.protocol);
- if (PROTOCOL_62(&self->connInfo))
- {
- self->pg_version_number =3D (float) 6.2;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 2;
- }
- else if (PROTOCOL_63(&self->connInfo))
- {
- self->pg_version_number =3D (float) 6.3;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 3;
- }
- else
- {
- self->pg_version_number =3D (float) 6.4;
- self->pg_version_major =3D 6;
- self->pg_version_minor =3D 4;
- }
}
=20
=20
--- 735,740 ----
diff -c psqlodbc.orig\connection.h psqlodbc.cleanup\connection.h
*** psqlodbc.orig\connection.h Wed Nov 30 13:44:12 2005
--- psqlodbc.cleanup\connection.h Mon Dec 19 23:10:13 2005
***************
*** 171,183 ****
#define ARGV_SIZE 64
#define USRNAMEDATALEN 16
=20
- typedef unsigned int ProtocolVersion;
-=20
- #define PG_PROTOCOL(major, minor) (((major) << 16) | (minor))
- #define PG_PROTOCOL_LATEST PG_PROTOCOL(2, 0)
- #define PG_PROTOCOL_63 PG_PROTOCOL(1, 0)
- #define PG_PROTOCOL_62 PG_PROTOCOL(0, 0)
-=20
=20
typedef enum
{
--- 171,176 ----
***************
*** 189,199 ****
* statement */
} CONN_Status;
=20
- /* Transferred from pqcomm.h: */
-=20
-=20
- typedef ProtocolVersion MsgType;
-=20
/* Structure to hold all the connection attributes for a specific
connection (used for both registry and file, DSN and DRIVER) */
=20
--- 182,187 ----
***************
*** 207,213 ****
char username[MEDIUM_REGISTRY_LEN];
char password[MEDIUM_REGISTRY_LEN];
char conn_settings[LARGE_REGISTRY_LEN];
- char protocol[SMALL_REGISTRY_LEN];
char port[SMALL_REGISTRY_LEN];
char sslmode[MEDIUM_REGISTRY_LEN];
char onlyread[SMALL_REGISTRY_LEN];
--- 195,200 ----
***************
*** 231,242 ****
} ConnInfo;
=20
=20
- /* Macro to determine is the connection using 6.2 protocol? */
- #define PROTOCOL_62(conninfo_) (strncmp((conninfo_)->protocol, PG62, s=
trlen(PG62)) == 0)
-=20
- /* Macro to determine is the connection using 6.3 protocol? */
- #define PROTOCOL_63(conninfo_) (strncmp((conninfo_)->protocol, PG63, s=
trlen(PG63)) == 0)
-=20
/*
* Macros to compare the server's version with a specified version
* 1st parameter: pointer to a ConnectionClass object
--- 218,223 ----
***************
*** 390,396 ****
char CC_send_settings(ConnectionClass *self);
void CC_lookup_lo(ConnectionClass *conn);
void CC_lookup_pg_version(ConnectionClass *conn);
- void CC_initialize_pg_version(ConnectionClass *conn);
void CC_log_error(const char *func, const char *desc, const Connection=
Class *self);
int CC_get_max_query_len(const ConnectionClass *self);
int CC_send_cancel_request(const ConnectionClass *conn);
--- 371,376 ----
diff -c psqlodbc.orig\dlg_specific.c psqlodbc.cleanup\dlg_specific.c
*** psqlodbc.orig\dlg_specific.c Wed Nov 30 13:44:16 2005
--- psqlodbc.cleanup\dlg_specific.c Tue Dec 20 11:52:49 2005
***************
*** 12,17 ****
--- 12,21 ----
*
* API functions: none
*
+ * Removed params: Don't reuse old parameter name if it's not for orig=
inal
+ * purpose. Here is list of deleted params:
+ * Protocol communication protocol (befor=
e libpq)
+ *
* Comments: See "notice.txt" for copyright and license information.
*-------
*/
***************
*** 62,72 ****
hlen =3D strlen(connect_string);
if (!abbrev)
sprintf(&connect_string[hlen],
! ";%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s =3D%d;%=
s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D %d;%s=3D%d;%s=
=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%s;%s=3D%d;%s=3D% d;%s=3D%d;%s=3D=
%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d",
INI_READONLY,
ci->onlyread,
- INI_PROTOCOL,
- ci->protocol,
INI_FAKEOIDINDEX,
ci->fake_oid_index,
INI_SHOWOIDCOLUMN,
--- 66,74 ----
hlen =3D strlen(connect_string);
if (!abbrev)
sprintf(&connect_string[hlen],
! ";%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%s;%s=3D%d;%s =3D%d;%=
s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D %d;%s=3D%d;%s=
=3D%d;%s=3D%d;%s=3D%d;%s=3D%d;%s=3D%s;%s=3D%d;%s=3D%d;%s=3D% d;%s=3D%d;%s=3D=
%d;%s=3D%d;%s=3D%d;%s=3D%d",
INI_READONLY,
ci->onlyread,
INI_FAKEOIDINDEX,
ci->fake_oid_index,
INI_SHOWOIDCOLUMN,
***************
*** 137,148 ****
flag |=3D BIT_LFCONVERSION;
if (ci->drivers.unique_index)
flag |=3D BIT_UNIQUEINDEX;
- if (strncmp(ci->protocol, PG64, strlen(PG64)) == 0)
- flag |=3D BIT_PROTOCOL_64;
- else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0)
- flag |=3D BIT_PROTOCOL_63;
- else if (strncmp(ci->protocol, "7.4", 3) == 0)
- flag |=3D (BIT_PROTOCOL_63 | BIT_PROTOCOL_64);
switch (ci->drivers.unknown_sizes)
{
case UNKNOWNS_AS_DONTKNOW:
--- 139,144 ----
***************
*** 231,242 ****
if (count < 4)
return;
ci->drivers.unique_index =3D (char)((flag & BIT_UNIQUEINDEX) !=3D 0);
- if ((flag & BIT_PROTOCOL_64) !=3D 0)
- strcpy(ci->protocol, PG64);
- else if ((flag & BIT_PROTOCOL_63) !=3D 0)
- strcpy(ci->protocol, PG63);
- else
- strcpy(ci->protocol, PG62);
if ((flag & BIT_UNKNOWN_DONTKNOW) !=3D 0)
ci->drivers.unknown_sizes =3D UNKNOWNS_AS_DONTKNOW;
else if ((flag & BIT_UNKNOWN_ASMAX) !=3D 0)
--- 227,232 ----
***************
*** 293,301 ****
else if (stricmp(attribute, INI_READONLY) == 0 || stricmp(attribut=
e, "A0") == 0)
strcpy(ci->onlyread, value);
=20
- else if (stricmp(attribute, INI_PROTOCOL) == 0 || stricmp(attribut=
e, "A1") == 0)
- strcpy(ci->protocol, value);
-=20
else if (stricmp(attribute, INI_SHOWOIDCOLUMN) == 0 || stricmp(att=
ribute, "A3") == 0)
strcpy(ci->show_oid_column, value);
=20
--- 283,288 ----
***************
*** 332,338 ****
else if (stricmp(attribute, "CX") == 0)
unfoldCXAttribute(ci, value);
=20
! mylog("copyAttributes: DSN=3D'%s',server=3D'%s',dbase=3D'%s',user=3D'%=
s',passwd=3D'%s',port=3D'%s',sslmode=3D'%s',onlyread=3D'%s', protocol=3D'%=
s',conn_settings=3D'%s',disallow_premature=3D%d)\n", ci->dsn, ci->server,=
ci->database, ci->username, ci->password ? "xxxxx" : "", ci->port, ci->s=
slmode, ci->onlyread, ci->protocol, ci->conn_settings, ci->disallow_prema=
ture);
}
=20
void
--- 319,325 ----
else if (stricmp(attribute, "CX") == 0)
unfoldCXAttribute(ci, value);
=20
! mylog("copyAttributes: DSN=3D'%s',server=3D'%s',dbase=3D'%s',user=3D'%=
s',passwd=3D'%s',port=3D'%s',sslmode=3D'%s',onlyread=3D'%s', conn_settings=
=3D'%s',disallow_premature=3D%d)\n", ci->dsn, ci->server, ci->database, c=
i->username, ci->password ? "xxxxx" : "", ci->port, ci->sslmode, ci->only=
read, ci->conn_settings, ci->disallow_premature);
}
=20
void
***************
*** 410,418 ****
if (ci->onlyread[0] == '\0')
sprintf(ci->onlyread, "%d", globals.onlyread);
=20
- if (ci->protocol[0] == '\0')
- strcpy(ci->protocol, globals.protocol);
-=20
if (ci->fake_oid_index[0] == '\0')
sprintf(ci->fake_oid_index, "%d", DEFAULT_FAKEOIDINDEX);
=20
--- 397,402 ----
***************
*** 517,525 ****
if (ci->show_system_tables[0] == '\0' || overwrite)
SQLGetPrivateProfileString(DSN, INI_SHOWSYSTEMTABLES, "", ci->show_sy=
stem_tables, sizeof(ci->show_system_tables), ODBC_INI);
=20
- if (ci->protocol[0] == '\0' || overwrite)
- SQLGetPrivateProfileString(DSN, INI_PROTOCOL, "", ci->protocol, sizeo=
f(ci->protocol), ODBC_INI);
-=20
if (ci->conn_settings[0] == '\0' || overwrite)
{
SQLGetPrivateProfileString(DSN, INI_CONNSETTINGS, "", encoded_conn_se=
ttings, sizeof(encoded_conn_settings), ODBC_INI);
--- 501,506 ----
***************
*** 598,606 ****
ci->database,
ci->username,
ci->password ? "xxxxx" : "");
! qlog(" onlyread=3D'%s',protocol=3D'%s',showoid=3D'%s',fakeoid=
index=3D'%s',showsystable=3D'%s'\n",
ci->onlyread,
- ci->protocol,
ci->show_oid_column,
ci->fake_oid_index,
ci->show_system_tables);
--- 579,586 ----
ci->database,
ci->username,
ci->password ? "xxxxx" : "");
! qlog(" onlyread=3D'%s',showoid=3D'%s',fakeoidindex=3D'%s',sho=
wsystable=3D'%s'\n",
ci->onlyread,
ci->show_oid_column,
ci->fake_oid_index,
ci->show_system_tables);
***************
*** 776,786 ****
ODBC_INI);
=20
SQLWritePrivateProfileString(DSN,
- INI_PROTOCOL,
- ci->protocol,
- ODBC_INI);
-=20
- SQLWritePrivateProfileString(DSN,
INI_CONNSETTINGS,
encoded_conn_settings,
ODBC_INI);
--- 756,761 ----
***************
*** 1021,1036 ****
else
comval->onlyread =3D DEFAULT_READONLY;
=20
- /*
- * Default state for future DSN's protocol attribute This isn't a
- * real driver option YET. This is more intended for
- * customization from the install.
- */
- SQLGetPrivateProfileString(section, INI_PROTOCOL, "@@@",
- temp, sizeof(temp), filename);
- if (strcmp(temp, "@@@"))
- strcpy(comval->protocol, temp);
- else
- strcpy(comval->protocol, DEFAULT_PROTOCOL);
}
}
--- 996,1000 ----
diff -c psqlodbc.orig\dlg_specific.h psqlodbc.cleanup\dlg_specific.h
*** psqlodbc.orig\dlg_specific.h Wed Nov 30 13:44:16 2005
--- psqlodbc.cleanup\dlg_specific.h Mon Dec 19 23:03:31 2005
***************
*** 55,61 ****
#define INI_SOCKET "Socket" /* Socket buffer size */
#define INI_READONLY "ReadOnly" /* Database is read only */
#define INI_COMMLOG "CommLog" /* Communication to backend logging */
- #define INI_PROTOCOL "Protocol" /* What protocol (6.2) */
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */
#define INI_KSQO "Ksqo" /* Keyset query optimization */
#define INI_CONNSETTINGS "ConnSettings" /* Anything to send to backend=
on successful connection */
--- 55,60 ----
***************
*** 96,103 ****
#define BIT_UPDATABLECURSORS (1L<<1)
#define BIT_DISALLOWPREMATURE (1L<<2)
#define BIT_UNIQUEINDEX (1L<<3)
- #define BIT_PROTOCOL_63 (1L<<4)
- #define BIT_PROTOCOL_64 (1L<<5)
#define BIT_UNKNOWN_DONTKNOW (1L<<6)
#define BIT_UNKNOWN_ASMAX (1L<<7)
#define BIT_OPTIMIZER (1L<<8)
--- 95,100 ----
***************
*** 127,133 ****
#define DEFAULT_PORT "5432"
#define DEFAULT_SSLMODE "prefer"
#define DEFAULT_READONLY 0
- #define DEFAULT_PROTOCOL "6.4" /* the latest protocol is the default *=
/
#define DEFAULT_USEDECLAREFETCH 0
#define DEFAULT_TEXTASLONGVARCHAR 1
#define DEFAULT_UNKNOWNSASLONGVARCHAR 0
--- 124,129 ----
diff -c psqlodbc.orig\dlg_wingui.c psqlodbc.cleanup\dlg_wingui.c
*** psqlodbc.orig\dlg_wingui.c Wed Nov 30 13:44:17 2005
--- psqlodbc.cleanup\dlg_wingui.c Mon Dec 19 23:06:39 2005
***************
*** 455,469 ****
/* Readonly */
CheckDlgButton(hdlg, DS_READONLY, atoi(ci->onlyread));
=20
- /* Protocol */
- if (strncmp(ci->protocol, PG62, strlen(PG62)) == 0)
- CheckDlgButton(hdlg, DS_PG62, 1);
- else if (strncmp(ci->protocol, PG63, strlen(PG63)) == 0)
- CheckDlgButton(hdlg, DS_PG63, 1);
- else
- /* latest */
- CheckDlgButton(hdlg, DS_PG64, 1);
-=20
/* Int8 As */
switch (ci->int8_as)
{
--- 456,461 ----
***************
*** 523,537 ****
=20
/* Readonly */
sprintf(ci->onlyread, "%d", IsDlgButtonChecked(hdlg, DS_READONLY))=
;
-=20
- /* Protocol */
- if (IsDlgButtonChecked(hdlg, DS_PG62))
- strcpy(ci->protocol, PG62);
- else if (IsDlgButtonChecked(hdlg, DS_PG63))
- strcpy(ci->protocol, PG63);
- else
- /* latest */
- strcpy(ci->protocol, PG64);
=20
/* Int8 As */
if (IsDlgButtonChecked(hdlg, DS_INT8_AS_DEFAULT))
--- 515,520 ----
diff -c psqlodbc.orig\drvconn.c psqlodbc.cleanup\drvconn.c
*** psqlodbc.orig\drvconn.c Wed Nov 30 13:44:17 2005
--- psqlodbc.cleanup\drvconn.c Mon Dec 19 23:10:06 2005
***************
*** 141,148 ****
=20
/* Fill in any default parameters if they are not there. */
getDSNdefaults(ci);
- /* initialize pg_version */
- CC_initialize_pg_version(conn);
salt[0] =3D '\0';
=20
#ifdef WIN32
--- 141,146 ----
diff -c psqlodbc.orig\psqlodbc.h psqlodbc.cleanup\psqlodbc.h
*** psqlodbc.orig\psqlodbc.h Wed Nov 30 13:44:32 2005
--- psqlodbc.cleanup\psqlodbc.h Mon Dec 19 23:04:36 2005
***************
*** 202,213 ****
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
=20
- #define PG62 "6.2" /* "Protocol" key setting
- * to force Postgres 6.2 */
- #define PG63 "6.3" /* "Protocol" key setting
- * to force postgres 6.3 */
- #define PG64 "6.4"
-=20
typedef struct ConnectionClass_ ConnectionClass;
typedef struct StatementClass_ StatementClass;
typedef struct QResultClass_ QResultClass;
--- 202,207 ----
***************
*** 252,258 ****
char cancel_as_freestmt;
char extra_systable_prefixes[MEDIUM_REGISTRY_LEN];
char conn_settings[LARGE_REGISTRY_LEN];
- char protocol[SMALL_REGISTRY_LEN];
} GLOBAL_VALUES;
=20
typedef struct StatementOptions_
--- 246,251 ----
diff -c psqlodbc.orig\psqlodbc.rc psqlodbc.cleanup\psqlodbc.rc
*** psqlodbc.orig\psqlodbc.rc Sat Dec 10 08:39:31 2005
--- psqlodbc.cleanup\psqlodbc.rc Mon Dec 19 22:45:22 2005
***************
*** 163,183 ****
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "=83vƒ=83g=83Rƒ‹=83o=81|=83Wƒ‡ƒ“",=
IDC_STATIC,5,128,296,25
! CONTROL ">=3D 6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS=
_GROUP,
! 18,139,49,10
! CONTROL "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 87,139,26,10
! CONTROL "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 140,140,26,10
! GROUPBOX "OID =83I=83v=83Vƒ‡ƒ“",IDC_STATIC,5,158,296=
,25
CONTROL "=83Jƒ‰ƒ€—ñ=95\Ž¦(&C)",DS_SHOWOIDCO=
LUMN,"Button",
! BS_AUTOCHECKBOX | WS_GROUP,16,169,72,10
CONTROL "=83Cƒ“=83f=83b=83N=83X‚ð‘•‚¤(&I)",=
DS_FAKEOIDINDEX,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,107,169,95,10
! LTEXT "Ú‘±Žž Ý’è:(&S)",IDC_STATIC=
,13,192,69,10,NOT=20
WS_GROUP
! EDITTEXT DS_CONNSETTINGS,90,191,211,27,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | N=
OT=20
WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,5,224,50,14,WS_GROUP
--- 159,172 ----
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "OID =83I=83v=83Vƒ‡ƒ“",IDC_STATIC,5,128,296=
,25
CONTROL "=83Jƒ‰ƒ€—ñ=95\Ž¦(&C)",DS_SHOWOIDCO=
LUMN,"Button",
! BS_AUTOCHECKBOX | WS_GROUP,16,139,72,10
CONTROL "=83Cƒ“=83f=83b=83N=83X‚ð‘•‚¤(&I)",=
DS_FAKEOIDINDEX,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,107,139,95,10
! LTEXT "Ú‘±Žž Ý’è:(&S)",IDC_STATIC=
,13,159,69,10,NOT=20
WS_GROUP
! EDITTEXT DS_CONNSETTINGS,90,160,211,58,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | N=
OT=20
WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,5,224,50,14,WS_GROUP
***************
*** 509,528 ****
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "Protocol",IDC_STATIC,5,126,277,25
! CONTROL ">=3D 6.4",DS_PG64,"Button",BS_AUTORADIOBUTTON | WS=
_GROUP,
! 44,137,49,10
! CONTROL "6.3",DS_PG63,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 117,137,26,10
! CONTROL "6.2",DS_PG62,"Button",BS_AUTORADIOBUTTON | WS_TABS=
TOP,
! 191,137,26,10
! GROUPBOX "OID Options",IDC_STATIC,5,155,277,25
CONTROL "Show &Column",DS_SHOWOIDCOLUMN,"Button",BS_AUTOCHE=
CKBOX |=20
! WS_GROUP | WS_TABSTOP,53,167,59,10
CONTROL "Fake &Index",DS_FAKEOIDINDEX,"Button",BS_AUTOCHECK=
BOX |=20
! WS_GROUP | WS_TABSTOP,155,166,51,10
! LTEXT "Connect\n&Settings",IDC_STATIC,5,188,62,17
! EDITTEXT DS_CONNSETTINGS,47,188,235,27,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,121,220,50,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,231,220,50,14
--- 490,502 ----
WS_TABSTOP,184,108,40,10
CONTROL "int4",DS_INT8_AS_INT4,"Button",BS_AUTORADIOBUTTON =
|=20
WS_TABSTOP,227,108,29,10
! GROUPBOX "OID Options",IDC_STATIC,5,127,277,25
CONTROL "Show &Column",DS_SHOWOIDCOLUMN,"Button",BS_AUTOCHE=
CKBOX |=20
! WS_GROUP | WS_TABSTOP,53,138,59,10
CONTROL "Fake &Index",DS_FAKEOIDINDEX,"Button",BS_AUTOCHECK=
BOX |=20
! WS_GROUP | WS_TABSTOP,155,138,51,10
! LTEXT "Connect\n&Settings",IDC_STATIC,5,160,62,17
! EDITTEXT DS_CONNSETTINGS,47,160,235,55,ES_MULTILINE |=20
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
DEFPUSHBUTTON "OK",IDOK,121,220,50,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,231,220,50,14
diff -c psqlodbc.orig\resource.h psqlodbc.cleanup\resource.h
*** psqlodbc.orig\resource.h Wed Nov 30 13:44:33 2005
--- psqlodbc.cleanup\resource.h Mon Dec 19 23:06:08 2005
***************
*** 34,40 ****
#define DS_SHOWOIDCOLUMN 1012
#define DS_FAKEOIDINDEX 1013
#define DRV_COMMLOG 1014
- #define DS_PG62 1016
#define IDC_DATASOURCE 1018
#define DRV_OPTIMIZER 1019
#define DS_CONNSETTINGS 1020
--- 34,39 ----
***************
*** 62,69 ****
#define DRV_CANCELASFREESTMT 1053
#define IDC_OPTIONS 1054
#define DRV_KSQO 1055
- #define DS_PG64 1057
- #define DS_PG63 1058
#define DRV_OR_DSN 1059
#define DRV_DEBUG 1060
#define DS_DISALLOWPREMATURE 1061
--- 61,66 ----

--LZvS9be/3tNcYl/X
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

--LZvS9be/3tNcYl/X--

Re: patch for cleanup protocol

am 20.12.2005 11:40:31 von Dave Page

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 20 December 2005 10:23
> To: Tomas Skäre
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] patch for cleanup protocol
>=20
> I try add some note but I don't know if it fits you=20
> expectation. If it's
> not good for you please change it and send me patch which solve it.

Looks great to me.

Thanks, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org