Odbcapi30.c - 64 bit compiler warning cleanup

Odbcapi30.c - 64 bit compiler warning cleanup

am 19.01.2006 12:11:02 von Dave Page

This is a multi-part message in MIME format.

------_=_NextPart_001_01C61CE9.0941E378
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<>=20
The attached patch cleans up the 64 bit compiler warnings in
odbcapi30.c.

Luf, if you're happy, can you add it to your collection of patches ready
for application please? I didn't apply it myself in case I break any of
yours.

Regards, Dave.

------_=_NextPart_001_01C61CE9.0941E378
Content-Type: application/octet-stream;
name="odbcapi30_64bit.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="odbcapi30_64bit.patch"

SW5kZXg6IG9kYmNhcGkzMC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNT
IGZpbGU6IC9jdnNyb290L3BzcWxvZGJjL3BzcWxvZGJjL29kYmNhcGkzMC5j
LHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjM0CmRpZmYgLWMgLXIxLjM0IG9k
YmNhcGkzMC5jCioqKiBvZGJjYXBpMzAuYwkyMCBPY3QgMjAwNSAxMzowNjox
MCAtMDAwMAkxLjM0Ci0tLSBvZGJjYXBpMzAuYwkxOSBKYW4gMjAwNiAxMTow
NTowMSAtMDAwMAoqKioqKioqKioqKioqKioKKioqIDQyMiw0NDEgKioqKgog
IAlzd2l0Y2ggKEF0dHJpYnV0ZSkKICAJewogIAkJY2FzZSBTUUxfQVRUUl9D
T05ORUNUSU9OX1BPT0xJTkc6CiEgCQkJc3dpdGNoICgoU1FMVUlOVEVHRVIp
IFZhbHVlKQogIAkJCXsKISAJCQkgCWNhc2UgU1FMX0NQX09GRjoKISAJCQkJ
CUVOX3Vuc2V0X3Bvb2xpbmcoZW52KTsKISAJCQkJCXJldCA9IFNRTF9TVUND
RVNTOwohIAkJCQkJYnJlYWs7CiAgI2lmIGRlZmluZWQoV0lOX01VTFR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disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

------_=_NextPart_001_01C61CE9.0941E378--

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 19.01.2006 12:23:31 von Ludek Finstrle

> The attached patch cleans up the 64 bit compiler warnings in
> odbcapi30.c.

I'll try it today or tomorrow (I hope).

> Luf, if you're happy, can you add it to your collection of patches ready
> for application please? I didn't apply it myself in case I break any of
> yours.

Ok. I apply a lot of them to CVS till end of week. I see no negative
reaction - I have to verify the implicit rollback problem.

Regards,

Luf

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

http://archives.postgresql.org

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 19.01.2006 14:42:17 von Dave Page

=20

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> Sent: 19 January 2006 11:24
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup
>=20
> > The attached patch cleans up the 64 bit compiler warnings in
> > odbcapi30.c.
>=20
> I'll try it today or tomorrow (I hope).

Thanks - I should add that I'm not sure how to deal with the other ones.
I think it needs someone far more experienced in 32/64 bit issues than
me to think about it.

Regards, Dave.

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

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 23.01.2006 10:06:56 von Ludek Finstrle

> > > The attached patch cleans up the 64 bit compiler warnings in
> > > odbcapi30.c.
> >
> > I'll try it today or tomorrow (I hope).

I'm a little bit late. I had problems with my 64-bit box during weekend.
I have installed pgsql and unixODBC now. I hope I finish this work today.

> Thanks - I should add that I'm not sure how to deal with the other ones.
> I think it needs someone far more experienced in 32/64 bit issues than
> me to think about it.

I take a look on it but I think I'm less experienced in C and I have no
experience with 32/64 bit issue.

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 24.01.2006 20:25:33 von Ludek Finstrle

> I'm a little bit late. I had problems with my 64-bit box during weekend.
> I have installed pgsql and unixODBC now. I hope I finish this work today.

I have problem with auto* tools to create configure :-(

I have x86_64 CentOS 4.2 with all updates. auto* versions:
aclocal (GNU automake) 1.9.2
libtoolize (GNU libtool) 1.5.6
autoconf (GNU Autoconf) 2.59
autoheader (GNU Autoconf) 2.59
automake (GNU automake) 1.9.2

I have installed rpms:
postgresql-8.1.2
postgresql-server
postgresql-libs
postgresql-devel
postgresql-pl

configure.ac:10: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:18: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:19: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:66: error: possibly undefined macro: AC_CHECK_FUNCS
configure.ac:85: error: possibly undefined macro: AC_TRY_COMPILE

Do I need whole postgresql source code? I try give to aclocal rpm build
dir witoccess.
Any ideas?

Luf

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 24.01.2006 21:18:31 von Dave Page

-----Original Message-----
From: "Ludek Finstrle"
Sent: 24/01/06 19:25:45
To: "Dave Page"
Cc: "pgsql-odbc@postgresql.org"
Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup

> Do I need whole postgresql source code?

Yes - see the unix compilation doc for the full steps.

Regards, Dave

-----Unmodified Original Message-----
> I'm a little bit late. I had problems with my 64-bit box during weekend.
> I have installed pgsql and unixODBC now. I hope I finish this work today.

I have problem with auto* tools to create configure :-(

I have x86_64 CentOS 4.2 with all updates. auto* versions:
aclocal (GNU automake) 1.9.2
libtoolize (GNU libtool) 1.5.6
autoconf (GNU Autoconf) 2.59
autoheader (GNU Autoconf) 2.59
automake (GNU automake) 1.9.2

I have installed rpms:
postgresql-8.1.2
postgresql-server
postgresql-libs
postgresql-devel
postgresql-pl

configure.ac:10: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:18: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:19: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:66: error: possibly undefined macro: AC_CHECK_FUNCS
configure.ac:85: error: possibly undefined macro: AC_TRY_COMPILE

Do I need whole postgresql source code? I try give to aclocal rpm build
dir witoccess.
Any ideas?

Luf

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 24.01.2006 21:39:29 von Ludek Finstrle

> > Do I need whole postgresql source code?
>
> Yes - see the unix compilation doc for the full steps.

I was working with this manual but I maked two mistakes:
1) I didn't copy libtool.m4
2) I used only base pgsql source dir (not config subdir)

I have to better read next time. Now I'm able to build it.

Thanks,

Luf

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 24.01.2006 22:22:32 von Dave Page

On 24/1/06 20:39, "Ludek Finstrle" wrote:

>>> Do I need whole postgresql source code?
>>
>> Yes - see the unix compilation doc for the full steps.
>
> I was working with this manual but I maked two mistakes:
> 1) I didn't copy libtool.m4
> 2) I used only base pgsql source dir (not config subdir)
>
> I have to better read next time. Now I'm able to build it.

I think we've all been there! :-)

Regards, Dave.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 11:17:38 von Ludek Finstrle

--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

> The attached patch cleans up the 64 bit compiler warnings in
> odbcapi30.c.

I test it and add more warning cleanups. I include your patch into
attached one. I tried it a little bit on 64-bit and 32-bit box.

I don't solve the problem in options.c where 64-bit pointer may
be passwd throught 32-bit number. I don't know how to solve it.

Please review and comment.

Regards,

Luf

--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-64bit.diff"

diff -c psqlodbc.orig/odbcapi30.c psqlodbc/odbcapi30.c
*** psqlodbc.orig/odbcapi30.c 2006-01-26 00:58:08.000000000 +0100
--- psqlodbc/odbcapi30.c 2006-01-24 20:08:00.000000000 +0100
***************
*** 422,441 ****
switch (Attribute)
{
case SQL_ATTR_CONNECTION_POOLING:
! switch ((SQLUINTEGER) Value)
{
! case SQL_CP_OFF:
! EN_unset_pooling(env);
! ret = SQL_SUCCESS;
! break;
#if defined(WIN_MULTITHREAD_SUPPORT) || defined(POSIX_MULTITHREAD_SUPPORT)
! case SQL_CP_ONE_PER_DRIVER:
! EN_set_pooling(env);
! ret = SQL_SUCCESS;
! break;
#endif /* WIN_MULTITHREAD_SUPPORT */
! default:
! ret = SQL_SUCCESS_WITH_INFO;
}
break;
case SQL_ATTR_CP_MATCH:
--- 422,442 ----
switch (Attribute)
{
case SQL_ATTR_CONNECTION_POOLING:
! if (Value == (PTR) SQL_CP_OFF)
{
! EN_unset_pooling(env);
! ret = SQL_SUCCESS;
! }
#if defined(WIN_MULTITHREAD_SUPPORT) || defined(POSIX_MULTITHREAD_SUPPORT)
! else if (Value == (PTR) SQL_CP_ONE_PER_DRIVER)
! {
! EN_set_pooling(env);
! ret = SQL_SUCCESS;
! }
#endif /* WIN_MULTITHREAD_SUPPORT */
! else
! {
! ret = SQL_SUCCESS_WITH_INFO;
}
break;
case SQL_ATTR_CP_MATCH:
***************
*** 443,456 ****
ret = SQL_SUCCESS;
break;
case SQL_ATTR_ODBC_VERSION:
! if ((SQLUINTEGER) Value == SQL_OV_ODBC2)
EN_set_odbc2(env);
else
EN_set_odbc3(env);
ret = SQL_SUCCESS;
break;
case SQL_ATTR_OUTPUT_NTS:
! if ((SQLUINTEGER) Value == SQL_TRUE)
ret = SQL_SUCCESS;
else
ret = SQL_SUCCESS_WITH_INFO;
--- 444,457 ----
ret = SQL_SUCCESS;
break;
case SQL_ATTR_ODBC_VERSION:
! if (Value == (PTR) SQL_OV_ODBC2)
EN_set_odbc2(env);
else
EN_set_odbc3(env);
ret = SQL_SUCCESS;
break;
case SQL_ATTR_OUTPUT_NTS:
! if (Value == (PTR) SQL_TRUE)
ret = SQL_SUCCESS;
else
ret = SQL_SUCCESS_WITH_INFO;
diff -c psqlodbc.orig/pgapi30.c psqlodbc/pgapi30.c
*** psqlodbc.orig/pgapi30.c 2005-12-02 12:00:43.000000000 +0100
--- psqlodbc/pgapi30.c 2006-01-26 00:54:26.000000000 +0100
***************
*** 475,481 ****
switch (FieldIdentifier)
{
case SQL_DESC_ARRAY_SIZE:
! opts->size_of_rowset = (SQLUINTEGER) Value;
return ret;
case SQL_DESC_ARRAY_STATUS_PTR:
opts->row_operation_ptr = Value;
--- 475,481 ----
switch (FieldIdentifier)
{
case SQL_DESC_ARRAY_SIZE:
! opts->size_of_rowset = (SQLUINTEGER) ((unsigned long) Value);
return ret;
case SQL_DESC_ARRAY_STATUS_PTR:
opts->row_operation_ptr = Value;
***************
*** 484,493 ****
opts->row_offset_ptr = Value;
return ret;
case SQL_DESC_BIND_TYPE:
! opts->bind_size = (SQLUINTEGER) Value;
return ret;
case SQL_DESC_COUNT:
! column_bindings_set(opts, (SQLUINTEGER) Value, FALSE);
return ret;

case SQL_DESC_TYPE:
--- 484,493 ----
opts->row_offset_ptr = Value;
return ret;
case SQL_DESC_BIND_TYPE:
! opts->bind_size = (SQLUINTEGER) ((unsigned long) Value);
return ret;
case SQL_DESC_COUNT:
! column_bindings_set(opts, (SQLUINTEGER) ((unsigned long) Value), FALSE);
return ret;

case SQL_DESC_TYPE:
***************
*** 532,538 ****
{
case SQL_DESC_TYPE:
reset_a_column_binding(opts, RecNumber);
! opts->bindings[row_idx].returntype = (Int4) Value;
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (opts->bindings[row_idx].returntype)
--- 532,538 ----
{
case SQL_DESC_TYPE:
reset_a_column_binding(opts, RecNumber);
! opts->bindings[row_idx].returntype = (Int4) ((long) Value);
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (opts->bindings[row_idx].returntype)
***************
*** 541,547 ****
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
! switch ((Int4) Value)
{
case SQL_CODE_DATE:
opts->bindings[row_idx].returntype = SQL_C_TYPE_DATE;
--- 541,547 ----
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
! switch ((Int4) ((long) Value))
{
case SQL_CODE_DATE:
opts->bindings[row_idx].returntype = SQL_C_TYPE_DATE;
***************
*** 557,563 ****
}
break;
case SQL_DESC_CONCISE_TYPE:
! opts->bindings[row_idx].returntype = (Int4) Value;
break;
case SQL_DESC_DATA_PTR:
opts->bindings[row_idx].buffer = Value;
--- 557,563 ----
}
break;
case SQL_DESC_CONCISE_TYPE:
! opts->bindings[row_idx].returntype = (Int4) ((long) Value);
break;
case SQL_DESC_DATA_PTR:
opts->bindings[row_idx].buffer = Value;
***************
*** 574,586 ****
opts->bindings[row_idx].used = Value;
break;
case SQL_DESC_OCTET_LENGTH:
! opts->bindings[row_idx].buflen = (Int4) Value;
break;
case SQL_DESC_PRECISION:
! opts->bindings[row_idx].precision = (Int2)((Int4) Value);
break;
case SQL_DESC_SCALE:
! opts->bindings[row_idx].scale = (Int4) Value;
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_DATETIME_INTERVAL_PRECISION:
--- 574,586 ----
opts->bindings[row_idx].used = Value;
break;
case SQL_DESC_OCTET_LENGTH:
! opts->bindings[row_idx].buflen = (Int4) ((long) Value);
break;
case SQL_DESC_PRECISION:
! opts->bindings[row_idx].precision = (Int2)((long) Value);
break;
case SQL_DESC_SCALE:
! opts->bindings[row_idx].scale = (Int4) ((long) Value);
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_DATETIME_INTERVAL_PRECISION:
***************
*** 650,656 ****
switch (FieldIdentifier)
{
case SQL_DESC_ARRAY_SIZE:
! opts->paramset_size = (SQLUINTEGER) Value;
return ret;
case SQL_DESC_ARRAY_STATUS_PTR:
opts->param_operation_ptr = Value;
--- 650,656 ----
switch (FieldIdentifier)
{
case SQL_DESC_ARRAY_SIZE:
! opts->paramset_size = (SQLUINTEGER) ((unsigned long) Value);
return ret;
case SQL_DESC_ARRAY_STATUS_PTR:
opts->param_operation_ptr = Value;
***************
*** 659,668 ****
opts->param_offset_ptr = Value;
return ret;
case SQL_DESC_BIND_TYPE:
! opts->param_bind_type = (SQLUINTEGER) Value;
return ret;
case SQL_DESC_COUNT:
! parameter_bindings_set(opts, (SQLUINTEGER) Value, FALSE);
return ret;

case SQL_DESC_TYPE:
--- 659,668 ----
opts->param_offset_ptr = Value;
return ret;
case SQL_DESC_BIND_TYPE:
! opts->param_bind_type = (SQLUINTEGER) ((unsigned long) Value);
return ret;
case SQL_DESC_COUNT:
! parameter_bindings_set(opts, (SQLUINTEGER) ((unsigned long) Value), FALSE);
return ret;

case SQL_DESC_TYPE:
***************
*** 682,688 ****
{
case SQL_DESC_TYPE:
reset_a_parameter_binding(opts, RecNumber);
! opts->parameters[para_idx].CType = (Int4) Value;
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (opts->parameters[para_idx].CType)
--- 682,688 ----
{
case SQL_DESC_TYPE:
reset_a_parameter_binding(opts, RecNumber);
! opts->parameters[para_idx].CType = (Int4) ((long) Value);
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (opts->parameters[para_idx].CType)
***************
*** 691,697 ****
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
! switch ((Int4) Value)
{
case SQL_CODE_DATE:
opts->parameters[para_idx].CType = SQL_C_TYPE_DATE;
--- 691,697 ----
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
! switch ((Int4) ((long) Value))
{
case SQL_CODE_DATE:
opts->parameters[para_idx].CType = SQL_C_TYPE_DATE;
***************
*** 707,713 ****
}
break;
case SQL_DESC_CONCISE_TYPE:
! opts->parameters[para_idx].CType = (Int4) Value;
break;
case SQL_DESC_DATA_PTR:
opts->parameters[para_idx].buffer = Value;
--- 707,713 ----
}
break;
case SQL_DESC_CONCISE_TYPE:
! opts->parameters[para_idx].CType = (Int4) ((long) Value);
break;
case SQL_DESC_DATA_PTR:
opts->parameters[para_idx].buffer = Value;
***************
*** 720,735 ****
}
break;
case SQL_DESC_OCTET_LENGTH:
! opts->parameters[para_idx].buflen = (Int4) Value;
break;
case SQL_DESC_OCTET_LENGTH_PTR:
opts->parameters[para_idx].used = Value;
break;
case SQL_DESC_PRECISION:
! opts->parameters[para_idx].precision = (Int2) ((Int4) Value);
break;
case SQL_DESC_SCALE:
! opts->parameters[para_idx].scale = (Int2) ((Int4) Value);
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_DATETIME_INTERVAL_PRECISION:
--- 720,735 ----
}
break;
case SQL_DESC_OCTET_LENGTH:
! opts->parameters[para_idx].buflen = (Int4) ((long) Value);
break;
case SQL_DESC_OCTET_LENGTH_PTR:
opts->parameters[para_idx].used = Value;
break;
case SQL_DESC_PRECISION:
! opts->parameters[para_idx].precision = (Int2) ((long) Value);
break;
case SQL_DESC_SCALE:
! opts->parameters[para_idx].scale = (Int2) ((long) Value);
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_DATETIME_INTERVAL_PRECISION:
***************
*** 815,821 ****
ipdopts->param_processed_ptr = (UInt4 *) Value;
return ret;
case SQL_DESC_UNNAMED: /* only SQL_UNNAMED is allowed */
! if (SQL_UNNAMED != (SQLUINTEGER) Value)
{
ret = SQL_ERROR;
DC_set_error(desc, STMT_INVALID_DESCRIPTOR_IDENTIFIER,
--- 815,821 ----
ipdopts->param_processed_ptr = (UInt4 *) Value;
return ret;
case SQL_DESC_UNNAMED: /* only SQL_UNNAMED is allowed */
! if (SQL_UNNAMED != (SQLUINTEGER) ((unsigned long) Value))
{
ret = SQL_ERROR;
DC_set_error(desc, STMT_INVALID_DESCRIPTOR_IDENTIFIER,
***************
*** 823,829 ****
}
return ret;
case SQL_DESC_COUNT:
! parameter_ibindings_set(ipdopts, (SQLUINTEGER) Value, FALSE);
return ret;
case SQL_DESC_TYPE:
case SQL_DESC_DATETIME_INTERVAL_CODE:
--- 823,829 ----
}
return ret;
case SQL_DESC_COUNT:
! parameter_ibindings_set(ipdopts, (SQLUINTEGER) ((unsigned long) Value), FALSE);
return ret;
case SQL_DESC_TYPE:
case SQL_DESC_DATETIME_INTERVAL_CODE:
***************
*** 842,848 ****
{
case SQL_DESC_TYPE:
reset_a_iparameter_binding(ipdopts, RecNumber);
! ipdopts->parameters[para_idx].SQLType = (Int4) Value;
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (ipdopts->parameters[para_idx].SQLType)
--- 842,848 ----
{
case SQL_DESC_TYPE:
reset_a_iparameter_binding(ipdopts, RecNumber);
! ipdopts->parameters[para_idx].SQLType = (Int4) ((long) Value);
break;
case SQL_DESC_DATETIME_INTERVAL_CODE:
switch (ipdopts->parameters[para_idx].SQLType)
***************
*** 851,857 ****
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
case SQL_TYPE_TIMESTAMP:
! switch ((Int4) Value)
{
case SQL_CODE_DATE:
ipdopts->parameters[para_idx].SQLType = SQL_TYPE_DATE;
--- 851,857 ----
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
case SQL_TYPE_TIMESTAMP:
! switch ((Int4) ((long) Value))
{
case SQL_CODE_DATE:
ipdopts->parameters[para_idx].SQLType = SQL_TYPE_DATE;
***************
*** 867,879 ****
}
break;
case SQL_DESC_CONCISE_TYPE:
! ipdopts->parameters[para_idx].SQLType = (Int4) Value;
break;
case SQL_DESC_PARAMETER_TYPE:
! ipdopts->parameters[para_idx].paramType = (Int2) ((Int4) Value);
break;
case SQL_DESC_SCALE:
! ipdopts->parameters[para_idx].decimal_digits = (Int2) ((Int4) Value);
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_CASE_SENSITIVE: /* read-only */
--- 867,879 ----
}
break;
case SQL_DESC_CONCISE_TYPE:
! ipdopts->parameters[para_idx].SQLType = (Int4) ((long) Value);
break;
case SQL_DESC_PARAMETER_TYPE:
! ipdopts->parameters[para_idx].paramType = (Int2) ((long) Value);
break;
case SQL_DESC_SCALE:
! ipdopts->parameters[para_idx].decimal_digits = (Int2) ((long) Value);
break;
case SQL_DESC_ALLOC_TYPE: /* read-only */
case SQL_DESC_CASE_SENSITIVE: /* read-only */
***************
*** 1541,1552 ****
{
#if (ODBCVER >= 0x0351)
case SQL_ATTR_ANSI_APP:
! if ((SQLUINTEGER)Value == SQL_AA_TRUE)
conn->unicode = 0;
break;
#endif
case SQL_ATTR_METADATA_ID:
! conn->stmtOptions.metadata_id = (SQLUINTEGER) Value;
break;
case SQL_ATTR_ASYNC_ENABLE:
case SQL_ATTR_AUTO_IPD:
--- 1541,1552 ----
{
#if (ODBCVER >= 0x0351)
case SQL_ATTR_ANSI_APP:
! if (Value == (PTR) SQL_AA_TRUE)
conn->unicode = 0;
break;
#endif
case SQL_ATTR_METADATA_ID:
! conn->stmtOptions.metadata_id = (SQLUINTEGER) ((unsigned long) Value);
break;
case SQL_ATTR_ASYNC_ENABLE:
case SQL_ATTR_AUTO_IPD:
***************
*** 1556,1562 ****
CC_set_error(conn, STMT_OPTION_NOT_FOR_THE_DRIVER, "Unsupported connect attribute (Set)");
return SQL_ERROR;
default:
! ret = PGAPI_SetConnectOption(ConnectionHandle, (UWORD) Attribute, (UDWORD) Value);
}
return ret;
}
--- 1556,1562 ----
CC_set_error(conn, STMT_OPTION_NOT_FOR_THE_DRIVER, "Unsupported connect attribute (Set)");
return SQL_ERROR;
default:
! ret = PGAPI_SetConnectOption(ConnectionHandle, (UWORD) Attribute, (UDWORD) ((unsigned long) Value));
}
return ret;
}
***************
*** 1693,1702 ****
return SQL_ERROR;

case SQL_ATTR_METADATA_ID: /* 10014 */
! stmt->options.metadata_id = (SQLUINTEGER) Value;
break;
case SQL_ATTR_APP_ROW_DESC: /* 10010 */
! if (SQL_NULL_HDESC == Value)
{
stmt->ard = &(stmt->ardi);
}
--- 1693,1702 ----
return SQL_ERROR;

case SQL_ATTR_METADATA_ID: /* 10014 */
! stmt->options.metadata_id = (SQLUINTEGER) ((unsigned long) Value);
break;
case SQL_ATTR_APP_ROW_DESC: /* 10010 */
! if ((PTR) SQL_NULL_HDESC == Value)
{
stmt->ard = &(stmt->ardi);
}
***************
*** 1706,1712 ****
}
break;
case SQL_ATTR_APP_PARAM_DESC: /* 10011 */
! if (SQL_NULL_HDESC == Value)
{
stmt->apd = &(stmt->apdi);
}
--- 1706,1712 ----
}
break;
case SQL_ATTR_APP_PARAM_DESC: /* 10011 */
! if ((PTR) SQL_NULL_HDESC == Value)
{
stmt->apd = &(stmt->apdi);
}
***************
*** 1722,1728 ****
SC_get_APDF(stmt)->param_offset_ptr = (UInt4 *) Value;
break;
case SQL_ATTR_PARAM_BIND_TYPE: /* 18 */
! SC_get_APDF(stmt)->param_bind_type = (SQLUINTEGER) Value;
break;
case SQL_ATTR_PARAM_OPERATION_PTR: /* 19 */
SC_get_APDF(stmt)->param_operation_ptr = Value;
--- 1722,1728 ----
SC_get_APDF(stmt)->param_offset_ptr = (UInt4 *) Value;
break;
case SQL_ATTR_PARAM_BIND_TYPE: /* 18 */
! SC_get_APDF(stmt)->param_bind_type = (SQLUINTEGER) ((unsigned long) Value);
break;
case SQL_ATTR_PARAM_OPERATION_PTR: /* 19 */
SC_get_APDF(stmt)->param_operation_ptr = Value;
***************
*** 1734,1740 ****
SC_get_IPDF(stmt)->param_processed_ptr = (UInt4 *) Value;
break;
case SQL_ATTR_PARAMSET_SIZE: /* 22 */
! SC_get_APDF(stmt)->paramset_size = (SQLUINTEGER) Value;
break;
case SQL_ATTR_ROW_BIND_OFFSET_PTR: /* 23 */
SC_get_ARDF(stmt)->row_offset_ptr = (UInt4 *) Value;
--- 1734,1740 ----
SC_get_IPDF(stmt)->param_processed_ptr = (UInt4 *) Value;
break;
case SQL_ATTR_PARAMSET_SIZE: /* 22 */
! SC_get_APDF(stmt)->paramset_size = (SQLUINTEGER) ((unsigned long) Value);
break;
case SQL_ATTR_ROW_BIND_OFFSET_PTR: /* 23 */
SC_get_ARDF(stmt)->row_offset_ptr = (UInt4 *) Value;
***************
*** 1749,1758 ****
SC_get_IRDF(stmt)->rowsFetched = (UInt4 *) Value;
break;
case SQL_ATTR_ROW_ARRAY_SIZE: /* 27 */
! SC_get_ARDF(stmt)->size_of_rowset = (SQLUINTEGER) Value;
break;
default:
! return PGAPI_SetStmtOption(StatementHandle, (UWORD) Attribute, (UDWORD) Value);
}
return SQL_SUCCESS;
}
--- 1749,1758 ----
SC_get_IRDF(stmt)->rowsFetched = (UInt4 *) Value;
break;
case SQL_ATTR_ROW_ARRAY_SIZE: /* 27 */
! SC_get_ARDF(stmt)->size_of_rowset = (SQLUINTEGER) ((unsigned long) Value);
break;
default:
! return PGAPI_SetStmtOption(StatementHandle, (UWORD) Attribute, (UDWORD) ((unsigned long) Value));
}
return SQL_SUCCESS;
}

--gKMricLos+KVdGMg
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

--gKMricLos+KVdGMg--

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 15:55:06 von Dave Page

=20

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> Sent: 26 January 2006 10:18
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup
>=20
> > The attached patch cleans up the 64 bit compiler warnings in
> > odbcapi30.c.
>=20
> I test it and add more warning cleanups. I include your patch into
> attached one. I tried it a little bit on 64-bit and 32-bit box.

Compiles without errors or warnings here.

> I don't solve the problem in options.c where 64-bit pointer may
> be passwd throught 32-bit number. I don't know how to solve it.

No nor I. Any chance of a little help with this one please Tom?

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 16:57:13 von Tom Lane

"Dave Page" writes:
>> From: Ludek Finstrle [mailto:luf@pzkagis.cz]
>> I don't solve the problem in options.c where 64-bit pointer may
>> be passwd throught 32-bit number. I don't know how to solve it.

> No nor I. Any chance of a little help with this one please Tom?

I assume that you can't alter the signature of PGAPI_SetConnectOption,
ie, vParam really has to be SQLUINTEGER and not some other type?

If so, I'd argue that that whole block (the "if (fOption == 30002 &&
vParam)" stuff) ought to be #ifdef WIN32. It's certainly useless on
any other platform, and Microsoft is never going to figure out how
to 64-bit-ify that pile of junk they call an OS, so no need to bend
our brains wondering how this would work on 64-bit Windows.

regards, tom lane

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 17:53:38 von Dave Page

=20

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
> Sent: 26 January 2006 15:57
> To: Dave Page
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup=20
>=20
> "Dave Page" writes:
> >> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> >> I don't solve the problem in options.c where 64-bit pointer may
> >> be passwd throught 32-bit number. I don't know how to solve it.
>=20
> > No nor I. Any chance of a little help with this one please Tom?
>=20
> I assume that you can't alter the signature of PGAPI_SetConnectOption,
> ie, vParam really has to be SQLUINTEGER and not some other type?

The spec actually says it should be a SQLPOINTER. Changing to that
unleashes a whole barrel of extra fun unfortunately.

> If so, I'd argue that that whole block (the "if (fOption == 30002 &&
> vParam)" stuff) ought to be #ifdef WIN32. It's certainly useless on
> any other platform,=20

That's a good point - it didn't even cross my mind that that code is
only useful on Windows. Thanks Tom!

> and Microsoft is never going to figure out how
> to 64-bit-ify that pile of junk they call an OS, so no need to bend
> our brains wondering how this would work on 64-bit Windows.

There have been 64bit versions of Windows for Itanium for ages, and
2003/XP have also been readily available now for a few months. That
said, psqlODBC definitely doesn't support 64 bit builds on Windows yet.

Regards, Dave

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

http://archives.postgresql.org

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 18:07:12 von Dave Page

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6229A.F36BD603
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Dave Page
> Sent: 26 January 2006 16:54
> To: Tom Lane
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup=20
>=20
>
> > If so, I'd argue that that whole block (the "if (fOption == 30002 &&
> > vParam)" stuff) ought to be #ifdef WIN32. It's certainly useless on
> > any other platform,=20
>=20
> That's a good point - it didn't even cross my mind that that code is
> only useful on Windows. Thanks Tom!

And the resulting patch is attached, including the other 64 bit changes
that Luf & I have made already.

Luf, I think it's about time to apply the outstanding fixes and prepare
for a release. That OK with you?

Regards, Dave.

------_=_NextPart_001_01C6229A.F36BD603
Content-Type: application/octet-stream;
name="psqlodbc-64bit.diff"
Content-Transfer-Encoding: base64
Content-Description: psqlodbc-64bit.diff
Content-Disposition: attachment;
filename="psqlodbc-64bit.diff"

SW5kZXg6IG9kYmNhcGkzMC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNT
IGZpbGU6IC9jdnNyb290L3BzcWxvZGJjL3BzcWxvZGJjL29kYmNhcGkzMC5j
LHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjM0CmRpZmYgLWMgLXIxLjM0IG9k
YmNhcGkzMC5jCioqKiBvZGJjYXBpMzAuYwkyMCBPY3QgMjAwNSAxMzowNjox
MCAtMDAwMAkxLjM0Ci0tLSBvZGJjYXBpMzAuYwkyNiBKYW4gMjAwNiAxNzow
MzoyNiAtMDAwMAoqKioqKioqKioqKioqKioKKioqIDQyMiw0NDEgKioqKgog
IAlzd2l0Y2ggKEF0dHJpYnV0ZSkKICAJewogIAkJY2FzZSBTUUxfQVRUUl9D
T05ORUNUSU9OX1BPT0xJTkc6CiEgCQkJc3dpdGNoICgoU1FMVUlOVEVHRVIp
IFZhbHVlKQogIAkJCXsKISAJCQkgCWNhc2UgU1FMX0NQX09GRjoKISAJCQkJ
CUVOX3Vuc2V0X3Bvb2xpbmcoZW52KTsKISAJCQkJCXJldCA9IFNRTF9TVUND
RVNTOwohIAkJCQkJYnJlYWs7CiAgI2lmIGRlZmluZWQoV0lOX01VTFRJVEhS
RUFEX1NVUFBPUlQpIHx8IGRlZmluZWQoUE9TSVhfTVVMVElUSFJFQURfU1VQ
UE9SVCkKISAJCQkJY2FzZSBTUUxfQ1BfT05FX1BFUl9EUklWRVI6CiEgCQkJ
CQlFTl9zZXRfcG9vbGluZyhlbnYpOwohIAkJCQkJcmV0ID0gU1FMX1NVQ0NF
U1M7CiEgCQkJCQlicmVhazsKICAjZW5kaWYgLyogV0lOX01VTFRJVEhSRUFE
X1NVUFBPUlQgKi8KISAJCQkJZGVmYXVsdDoKISAJCQkJCXJldCA9IF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gKFVXT1JEKSBB
dHRyaWJ1dGUsIChVRFdPUkQpICgodW5zaWduZWQgbG9uZykgVmFsdWUpKTsK
ICAJfQogIAlyZXR1cm4gU1FMX1NVQ0NFU1M7CiAgfQo=

------_=_NextPart_001_01C6229A.F36BD603
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

------_=_NextPart_001_01C6229A.F36BD603--

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 18:16:54 von Tom Lane

"Dave Page" writes:
>> That's a good point - it didn't even cross my mind that that code is
>> only useful on Windows. Thanks Tom!

I can confirm that Luf's patch gets rid of all the other 64-bit warnings
for me.

> Luf, I think it's about time to apply the outstanding fixes and prepare
> for a release. That OK with you?

I'm getting antsy to have a release for Fedora 5 ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 19:37:25 von Ludek Finstrle

> > >> I don't solve the problem in options.c where 64-bit pointer may
> > >> be passwd throught 32-bit number. I don't know how to solve it.
> >
> > > No nor I. Any chance of a little help with this one please Tom?
> >
> > I assume that you can't alter the signature of PGAPI_SetConnectOption,
> > ie, vParam really has to be SQLUINTEGER and not some other type?
>
> The spec actually says it should be a SQLPOINTER. Changing to that
> unleashes a whole barrel of extra fun unfortunately.

I don't think it will be so problematic. I'll try it. It's the best way
to support Win64.

Very good point Tom.

> > and Microsoft is never going to figure out how
> > to 64-bit-ify that pile of junk they call an OS, so no need to bend
> > our brains wondering how this would work on 64-bit Windows.
>
> There have been 64bit versions of Windows for Itanium for ages, and
> 2003/XP have also been readily available now for a few months. That
> said, psqlODBC definitely doesn't support 64 bit builds on Windows yet.

I have no access to 64-bit windows. I have no 64-bit compiler for win :-(
We have to hope that someone will donate for 64-bit Windows version or
someone with access to 64-bit win with compiler will join us.

Regards,

Luf

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 19:40:28 von Ludek Finstrle

> And the resulting patch is attached, including the other 64 bit changes
> that Luf & I have made already.

I'm for wait a few days. I want to take a look at PGAPI_SetConnectOption
problem again.

> Luf, I think it's about time to apply the outstanding fixes and prepare
> for a release. That OK with you?

Partialy Ok. I need you answer me to: [ODBC] Disallow premature is broken.
I apply fixes ASAP (without 64-bit one for PGAPI_SetConnectOption).

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 26.01.2006 21:58:13 von Ludek Finstrle

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

> > > >> I don't solve the problem in options.c where 64-bit pointer may
> > > >> be passwd throught 32-bit number. I don't know how to solve it.
> > >
> > > > No nor I. Any chance of a little help with this one please Tom?
> > >
> > > I assume that you can't alter the signature of PGAPI_SetConnectOption,
> > > ie, vParam really has to be SQLUINTEGER and not some other type?
> >
> > The spec actually says it should be a SQLPOINTER. Changing to that
> > unleashes a whole barrel of extra fun unfortunately.
>
> I don't think it will be so problematic. I'll try it. It's the best way
> to support Win64.

Here is my result. Patch attached. I have no 64-bit box ready at hand here.
I will test it on 64-bit box tomorrow.

Please review and comment

Luf

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-64bit_SetConnectOption.diff"

diff -c psqlodbc.orig\options.c psqlodbc\options.c
*** psqlodbc.orig\options.c Wed Nov 30 13:44:27 2005
--- psqlodbc\options.c Thu Jan 26 22:42:12 2006
***************
*** 314,320 ****
RETCODE SQL_API
PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLUINTEGER vParam)
{
CSTR func = "PGAPI_SetConnectOption";
ConnectionClass *conn = (ConnectionClass *) hdbc;
--- 314,320 ----
RETCODE SQL_API
PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLPOINTER vParam)
{
CSTR func = "PGAPI_SetConnectOption";
ConnectionClass *conn = (ConnectionClass *) hdbc;
***************
*** 322,328 ****
RETCODE retval;
int i;

! mylog("%s: entering fOption = %d vParam = %d\n", func, fOption, vParam);
if (!conn)
{
CC_log_error(func, "", NULL);
--- 322,328 ----
RETCODE retval;
int i;

! mylog("%s: entering fOption = %d vParam = %d\n", func, fOption, (unsigned long) vParam);
if (!conn)
{
CC_log_error(func, "", NULL);
***************
*** 353,366 ****
for (i = 0; i < conn->num_stmts; i++)
{
if (conn->stmts[i])
! set_statement_option(NULL, conn->stmts[i], fOption, vParam);
}

/*
* Become the default for all future statements on this
* connection
*/
! retval = set_statement_option(conn, NULL, fOption, vParam);

if (retval == SQL_SUCCESS_WITH_INFO)
changed = TRUE;
--- 353,366 ----
for (i = 0; i < conn->num_stmts; i++)
{
if (conn->stmts[i])
! set_statement_option(NULL, conn->stmts[i], fOption, (UDWORD) ((unsigned long) vParam));
}

/*
* Become the default for all future statements on this
* connection
*/
! retval = set_statement_option(conn, NULL, fOption, (UDWORD) ((unsigned long) vParam));

if (retval == SQL_SUCCESS_WITH_INFO)
changed = TRUE;
***************
*** 377,392 ****
break;

case SQL_AUTOCOMMIT:
! if (vParam == SQL_AUTOCOMMIT_ON && CC_is_in_autocommit(conn))
break;
! else if (vParam == SQL_AUTOCOMMIT_OFF && !CC_is_in_autocommit(conn))
break;
if (CC_is_in_trans(conn))
CC_commit(conn);

! mylog("PGAPI_SetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam);

! switch (vParam)
{
case SQL_AUTOCOMMIT_OFF:
CC_set_autocommit_off(conn);
--- 377,392 ----
break;

case SQL_AUTOCOMMIT:
! if (vParam == (SQLPOINTER) SQL_AUTOCOMMIT_ON && CC_is_in_autocommit(conn))
break;
! else if (vParam == (SQLPOINTER) SQL_AUTOCOMMIT_OFF && !CC_is_in_autocommit(conn))
break;
if (CC_is_in_trans(conn))
CC_commit(conn);

! mylog("PGAPI_SetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, (SQLUINTEGER) ((unsigned long) vParam));

! switch ((unsigned long) vParam)
{
case SQL_AUTOCOMMIT_OFF:
CC_set_autocommit_off(conn);
***************
*** 423,431 ****
CC_log_error(func, "", conn);
return SQL_ERROR;
}
! if (conn->isolation == vParam)
break;
! switch (vParam)
{
case SQL_TXN_SERIALIZABLE:
if (PG_VERSION_GE(conn, 6.5) &&
--- 423,431 ----
CC_log_error(func, "", conn);
return SQL_ERROR;
}
! if ((SQLPOINTER) conn->isolation == vParam)
break;
! switch ((unsigned long) vParam)
{
case SQL_TXN_SERIALIZABLE:
if (PG_VERSION_GE(conn, 6.5) &&
***************
*** 450,456 ****
char *query;
QResultClass *res;

! if (vParam == SQL_TXN_SERIALIZABLE)
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE";
else
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED";
--- 450,456 ----
char *query;
QResultClass *res;

! if (vParam == (SQLPOINTER) SQL_TXN_SERIALIZABLE)
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE";
else
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED";
***************
*** 458,464 ****
if (!res || !QR_command_maybe_successful(res))
retval = SQL_ERROR;
else
! conn->isolation = vParam;
if (res)
QR_Destructor(res);
if (SQL_ERROR == retval)
--- 458,464 ----
if (!res || !QR_command_maybe_successful(res))
retval = SQL_ERROR;
else
! conn->isolation = (SQLUINTEGER) ((unsigned long) vParam);
if (res)
QR_Destructor(res);
if (SQL_ERROR == retval)
***************
*** 483,489 ****
char option[64];

CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Set)");
! sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
if (fOption == 30002 && vParam)
{
int cmp;
--- 483,489 ----
char option[64];

CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Set)");
! sprintf(option, "fOption=%d, vParam=%ld", fOption, (unsigned long) vParam);
if (fOption == 30002 && vParam)
{
int cmp;
diff -c psqlodbc.orig\pgapi30.c psqlodbc\pgapi30.c
*** psqlodbc.orig\pgapi30.c Thu Jan 26 22:22:51 2006
--- psqlodbc\pgapi30.c Thu Jan 26 22:43:36 2006
***************
*** 1556,1562 ****
CC_set_error(conn, STMT_OPTION_NOT_FOR_THE_DRIVER, "Unsupported connect attribute (Set)");
return SQL_ERROR;
default:
! ret = PGAPI_SetConnectOption(ConnectionHandle, (UWORD) Attribute, (UDWORD) ((unsigned long) Value));
}
return ret;
}
--- 1556,1562 ----
CC_set_error(conn, STMT_OPTION_NOT_FOR_THE_DRIVER, "Unsupported connect attribute (Set)");
return SQL_ERROR;
default:
! ret = PGAPI_SetConnectOption(ConnectionHandle, (UWORD) Attribute, Value);
}
return ret;
}
***************
*** 1833,1839 ****
}
conn = SC_get_conn(s->stmt);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
irdflds = SC_get_IRDF(s->stmt);
if (irdflds->rowsFetched)
*(irdflds->rowsFetched) = s->processed;
--- 1833,1839 ----
}
conn = SC_get_conn(s->stmt);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
irdflds = SC_get_IRDF(s->stmt);
if (irdflds->rowsFetched)
*(irdflds->rowsFetched) = s->processed;
***************
*** 1863,1869 ****
{
conn = SC_get_conn(s.stmt);
if (s.auto_commit_needed = (char) CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
}
if (SQL_ADD != s.operation)
{
--- 1863,1869 ----
{
conn = SC_get_conn(s.stmt);
if (s.auto_commit_needed = (char) CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_OFF);
}
if (SQL_ADD != s.operation)
{
diff -c psqlodbc.orig\pgapifunc.h psqlodbc\pgapifunc.h
*** psqlodbc.orig\pgapifunc.h Wed Nov 30 13:44:30 2005
--- psqlodbc\pgapifunc.h Thu Jan 26 22:42:08 2006
***************
*** 143,149 ****
SQLINTEGER *pcrow);
RETCODE SQL_API PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLUINTEGER vParam);
RETCODE SQL_API PGAPI_SetCursorName(HSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength);
RETCODE SQL_API PGAPI_SetParam(HSTMT StatementHandle,
--- 143,149 ----
SQLINTEGER *pcrow);
RETCODE SQL_API PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLPOINTER vParam);
RETCODE SQL_API PGAPI_SetCursorName(HSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength);
RETCODE SQL_API PGAPI_SetParam(HSTMT StatementHandle,
diff -c psqlodbc.orig\results.c psqlodbc\results.c
*** psqlodbc.orig\results.c Thu Jan 26 22:22:51 2006
--- psqlodbc\results.c Thu Jan 26 22:43:33 2006
***************
*** 3020,3026 ****
if (SQL_ERROR == ret)
CC_abort(conn);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
if (s->irow > 0)
{
if (SQL_ADD != s->fOption && s->ridx >= 0) /* for SQLGetData */
--- 3020,3026 ----
if (SQL_ERROR == ret)
CC_abort(conn);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
if (s->irow > 0)
{
if (SQL_ADD != s->fOption && s->ridx >= 0) /* for SQLGetData */
***************
*** 3126,3132 ****
case SQL_DELETE:
case SQL_ADD:
if (s.auto_commit_needed = CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
break;
}
#endif /* DRIVER_CURSOR_IMPLEMENT */
--- 3126,3132 ----
case SQL_DELETE:
case SQL_ADD:
if (s.auto_commit_needed = CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_OFF);
break;
}
#endif /* DRIVER_CURSOR_IMPLEMENT */
***************
*** 3187,3193 ****
if (SQL_ERROR == ret)
CC_abort(conn);
if (auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
if (irow > 0)
{
if (SQL_ADD != fOption && ridx >= 0) /* for SQLGetData */
--- 3187,3193 ----
if (SQL_ERROR == ret)
CC_abort(conn);
if (auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
if (irow > 0)
{
if (SQL_ADD != fOption && ridx >= 0) /* for SQLGetData */

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


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

--Nq2Wo0NMKNjxTN9z--

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 09:25:40 von Ludek Finstrle

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

> > > The spec actually says it should be a SQLPOINTER. Changing to that
> > > unleashes a whole barrel of extra fun unfortunately.
> >
> > I don't think it will be so problematic. I'll try it. It's the best way
> > to support Win64.
>
> Here is my result. Patch attached. I have no 64-bit box ready at hand here.
> I will test it on 64-bit box tomorrow.

I find one problem. New patch attached. I get no warning with this one.

Please review and comment

Luf

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-64bit_SetConnectOption.diff"

diff -c psqlodbc.orig/options.c psqlodbc/options.c
*** psqlodbc.orig/options.c 2005-11-25 11:43:25.000000000 +0100
--- psqlodbc/options.c 2006-01-27 12:18:27.000000000 +0100
***************
*** 314,320 ****
RETCODE SQL_API
PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLUINTEGER vParam)
{
CSTR func = "PGAPI_SetConnectOption";
ConnectionClass *conn = (ConnectionClass *) hdbc;
--- 314,320 ----
RETCODE SQL_API
PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLPOINTER vParam)
{
CSTR func = "PGAPI_SetConnectOption";
ConnectionClass *conn = (ConnectionClass *) hdbc;
***************
*** 322,328 ****
RETCODE retval;
int i;

! mylog("%s: entering fOption = %d vParam = %d\n", func, fOption, vParam);
if (!conn)
{
CC_log_error(func, "", NULL);
--- 322,328 ----
RETCODE retval;
int i;

! mylog("%s: entering fOption = %d vParam = %d\n", func, fOption, (unsigned long) vParam);
if (!conn)
{
CC_log_error(func, "", NULL);
***************
*** 353,366 ****
for (i = 0; i < conn->num_stmts; i++)
{
if (conn->stmts[i])
! set_statement_option(NULL, conn->stmts[i], fOption, vParam);
}

/*
* Become the default for all future statements on this
* connection
*/
! retval = set_statement_option(conn, NULL, fOption, vParam);

if (retval == SQL_SUCCESS_WITH_INFO)
changed = TRUE;
--- 353,366 ----
for (i = 0; i < conn->num_stmts; i++)
{
if (conn->stmts[i])
! set_statement_option(NULL, conn->stmts[i], fOption, (UDWORD) ((unsigned long) vParam));
}

/*
* Become the default for all future statements on this
* connection
*/
! retval = set_statement_option(conn, NULL, fOption, (UDWORD) ((unsigned long) vParam));

if (retval == SQL_SUCCESS_WITH_INFO)
changed = TRUE;
***************
*** 377,392 ****
break;

case SQL_AUTOCOMMIT:
! if (vParam == SQL_AUTOCOMMIT_ON && CC_is_in_autocommit(conn))
break;
! else if (vParam == SQL_AUTOCOMMIT_OFF && !CC_is_in_autocommit(conn))
break;
if (CC_is_in_trans(conn))
CC_commit(conn);

! mylog("PGAPI_SetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, vParam);

! switch (vParam)
{
case SQL_AUTOCOMMIT_OFF:
CC_set_autocommit_off(conn);
--- 377,392 ----
break;

case SQL_AUTOCOMMIT:
! if (vParam == (SQLPOINTER) SQL_AUTOCOMMIT_ON && CC_is_in_autocommit(conn))
break;
! else if (vParam == (SQLPOINTER) SQL_AUTOCOMMIT_OFF && !CC_is_in_autocommit(conn))
break;
if (CC_is_in_trans(conn))
CC_commit(conn);

! mylog("PGAPI_SetConnectOption: AUTOCOMMIT: transact_status=%d, vparam=%d\n", conn->transact_status, (SQLUINTEGER) ((unsigned long) vParam));

! switch ((unsigned long) vParam)
{
case SQL_AUTOCOMMIT_OFF:
CC_set_autocommit_off(conn);
***************
*** 423,431 ****
CC_log_error(func, "", conn);
return SQL_ERROR;
}
! if (conn->isolation == vParam)
break;
! switch (vParam)
{
case SQL_TXN_SERIALIZABLE:
if (PG_VERSION_GE(conn, 6.5) &&
--- 423,431 ----
CC_log_error(func, "", conn);
return SQL_ERROR;
}
! if (conn->isolation == (unsigned long) vParam)
break;
! switch ((unsigned long) vParam)
{
case SQL_TXN_SERIALIZABLE:
if (PG_VERSION_GE(conn, 6.5) &&
***************
*** 450,456 ****
char *query;
QResultClass *res;

! if (vParam == SQL_TXN_SERIALIZABLE)
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE";
else
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED";
--- 450,456 ----
char *query;
QResultClass *res;

! if (vParam == (SQLPOINTER) SQL_TXN_SERIALIZABLE)
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE";
else
query = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL READ COMMITTED";
***************
*** 458,464 ****
if (!res || !QR_command_maybe_successful(res))
retval = SQL_ERROR;
else
! conn->isolation = vParam;
if (res)
QR_Destructor(res);
if (SQL_ERROR == retval)
--- 458,464 ----
if (!res || !QR_command_maybe_successful(res))
retval = SQL_ERROR;
else
! conn->isolation = (SQLUINTEGER) ((unsigned long) vParam);
if (res)
QR_Destructor(res);
if (SQL_ERROR == retval)
***************
*** 483,489 ****
char option[64];

CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Set)");
! sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
if (fOption == 30002 && vParam)
{
int cmp;
--- 483,489 ----
char option[64];

CC_set_error(conn, CONN_UNSUPPORTED_OPTION, "Unknown connect option (Set)");
! sprintf(option, "fOption=%d, vParam=%ld", fOption, (unsigned long) vParam);
if (fOption == 30002 && vParam)
{
int cmp;
diff -c psqlodbc.orig/pgapifunc.h psqlodbc/pgapifunc.h
*** psqlodbc.orig/pgapifunc.h 2005-11-25 11:43:25.000000000 +0100
--- psqlodbc/pgapifunc.h 2006-01-27 12:16:05.000000000 +0100
***************
*** 143,149 ****
SQLINTEGER *pcrow);
RETCODE SQL_API PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLUINTEGER vParam);
RETCODE SQL_API PGAPI_SetCursorName(HSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength);
RETCODE SQL_API PGAPI_SetParam(HSTMT StatementHandle,
--- 143,149 ----
SQLINTEGER *pcrow);
RETCODE SQL_API PGAPI_SetConnectOption(HDBC hdbc,
SQLUSMALLINT fOption,
! SQLPOINTER vParam);
RETCODE SQL_API PGAPI_SetCursorName(HSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength);
RETCODE SQL_API PGAPI_SetParam(HSTMT StatementHandle,
diff -c psqlodbc.orig/pgapi30.c psqlodbc/pgapi30.c
*** psqlodbc.orig/pgapi30.c 2005-12-02 12:00:43.000000000 +0100
--- psqlodbc/pgapi30.c 2006-01-27 12:15:55.000000000 +0100
***************
*** 1833,1839 ****
}
conn = SC_get_conn(s->stmt);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
irdflds = SC_get_IRDF(s->stmt);
if (irdflds->rowsFetched)
*(irdflds->rowsFetched) = s->processed;
--- 1833,1839 ----
}
conn = SC_get_conn(s->stmt);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
irdflds = SC_get_IRDF(s->stmt);
if (irdflds->rowsFetched)
*(irdflds->rowsFetched) = s->processed;
***************
*** 1863,1869 ****
{
conn = SC_get_conn(s.stmt);
if (s.auto_commit_needed = (char) CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
}
if (SQL_ADD != s.operation)
{
--- 1863,1869 ----
{
conn = SC_get_conn(s.stmt);
if (s.auto_commit_needed = (char) CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_OFF);
}
if (SQL_ADD != s.operation)
{
diff -c psqlodbc.orig/results.c psqlodbc/results.c
*** psqlodbc.orig/results.c 2005-12-08 10:11:28.000000000 +0100
--- psqlodbc/results.c 2006-01-27 12:16:15.000000000 +0100
***************
*** 3020,3026 ****
if (SQL_ERROR == ret)
CC_abort(conn);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
if (s->irow > 0)
{
if (SQL_ADD != s->fOption && s->ridx >= 0) /* for SQLGetData */
--- 3020,3026 ----
if (SQL_ERROR == ret)
CC_abort(conn);
if (s->auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
if (s->irow > 0)
{
if (SQL_ADD != s->fOption && s->ridx >= 0) /* for SQLGetData */
***************
*** 3125,3131 ****
case SQL_DELETE:
case SQL_ADD:
if (s.auto_commit_needed = CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
break;
}
#endif /* DRIVER_CURSOR_IMPLEMENT */
--- 3125,3131 ----
case SQL_DELETE:
case SQL_ADD:
if (s.auto_commit_needed = CC_is_in_autocommit(conn), s.auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_OFF);
break;
}
#endif /* DRIVER_CURSOR_IMPLEMENT */
***************
*** 3186,3192 ****
if (SQL_ERROR == ret)
CC_abort(conn);
if (auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_ON);
if (irow > 0)
{
if (SQL_ADD != fOption && ridx >= 0) /* for SQLGetData */
--- 3186,3192 ----
if (SQL_ERROR == ret)
CC_abort(conn);
if (auto_commit_needed)
! PGAPI_SetConnectOption(conn, SQL_AUTOCOMMIT, (SQLPOINTER) SQL_AUTOCOMMIT_ON);
if (irow > 0)
{
if (SQL_ADD != fOption && ridx >= 0) /* for SQLGetData */

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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

--AhhlLboLdkugWU4S--

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 09:59:49 von Dave Page

=20

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> Sent: 27 January 2006 08:26
> To: Dave Page
> Cc: Tom Lane; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup
>=20
> > > > The spec actually says it should be a SQLPOINTER.=20
> Changing to that
> > > > unleashes a whole barrel of extra fun unfortunately.
> > >=20
> > > I don't think it will be so problematic. I'll try it.=20
> It's the best way
> > > to support Win64.
> >=20
> > Here is my result. Patch attached. I have no 64-bit box=20
> ready at hand here.
> > I will test it on 64-bit box tomorrow.
>=20
> I find one problem. New patch attached. I get no warning with=20
> this one.
>=20
> Please review and comment

Looks good on 64 bit linux and Windows here.

BTW, in your version bump commit, you missed a bit in psqlodbc.rc:

FILEVERSION 8,1,1,8
PRODUCTVERSION 8,1,1,8

I've committed this, but just in case you weren't aware :-)

/D

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 10:31:00 von Ludek Finstrle

> > Please review and comment
>
> Looks good on 64 bit linux and Windows here.
>
> BTW, in your version bump commit, you missed a bit in psqlodbc.rc:
>
> FILEVERSION 8,1,1,8
> PRODUCTVERSION 8,1,1,8

My fault. I edit version.h and than I was only looking for '0108' :-(
I hope there is no other problem with versioning.

> I've committed this, but just in case you weren't aware :-)

Thank you a lot Dave.

Regards,

Luf

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 10:40:01 von Dave Page

=20

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> Sent: 27 January 2006 09:31
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup
>=20
> > > Please review and comment
> >=20
> > Looks good on 64 bit linux and Windows here.
> >=20
> > BTW, in your version bump commit, you missed a bit in psqlodbc.rc:
> >=20
> > FILEVERSION 8,1,1,8
> > PRODUCTVERSION 8,1,1,8
>=20
> My fault. I edit version.h and than I was only looking for '0108' :-(
> I hope there is no other problem with versioning.

Not that I spotted! That one stands out though because it's what Windows
explorer shows you.

> > I've committed this, but just in case you weren't aware :-)
>=20
> Thank you a lot Dave.

NP.

/D

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 15:30:39 von Tom Lane

Ludek Finstrle writes:
> RETCODE SQL_API
> PGAPI_SetConnectOption(HDBC hdbc,
> SQLUSMALLINT fOption,
> ! SQLUINTEGER vParam)
> {
> CSTR func = "PGAPI_SetConnectOption";
> ConnectionClass *conn = (ConnectionClass *) hdbc;
> --- 314,320 ----
> RETCODE SQL_API
> PGAPI_SetConnectOption(HDBC hdbc,
> SQLUSMALLINT fOption,
> ! SQLPOINTER vParam)
> {
> CSTR func = "PGAPI_SetConnectOption";
> ConnectionClass *conn = (ConnectionClass *) hdbc;

The problem with this is that it creates an ABI breakage. I don't think
we can just push this out as a bug fix --- it would require a major
version bump, no?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 15:34:39 von Dave Page

=20

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
> Sent: 27 January 2006 14:31
> To: Ludek Finstrle
> Cc: Dave Page; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup=20
>=20
> The problem with this is that it creates an ABI breakage. I=20
> don't think
> we can just push this out as a bug fix --- it would require a major
> version bump, no?

Is that actually a problem given that apps should link to the driver
manager (which can dynamically load any version of any driver), not
directly to the driver itself?

Regards, Dave.

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 15:45:28 von Tom Lane

"Dave Page" writes:
>> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>> The problem with this is that it creates an ABI breakage.

> Is that actually a problem given that apps should link to the driver
> manager (which can dynamically load any version of any driver), not
> directly to the driver itself?

Hm, good point. So the question then becomes whether the driver manager
is expecting this parameter to be int-sized or pointer-sized.

I took a quick look at the unixODBC sources (2.0.4 which is what I have
handy, I know it's a bit old) and got completely confused: I see the
parameter declared as SQLUINTEGER in some places and UDWORD in others.
Anyone know that code base well enough to be certain which place is
definitive?

regards, tom lane

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 15:55:02 von Dave Page

=20

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
> Sent: 27 January 2006 14:45
> To: Dave Page
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup=20
>=20
> "Dave Page" writes:
> >> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
> >> The problem with this is that it creates an ABI breakage.
>=20
> > Is that actually a problem given that apps should link to the driver
> > manager (which can dynamically load any version of any driver), not
> > directly to the driver itself?
>=20
> Hm, good point. So the question then becomes whether the=20
> driver manager
> is expecting this parameter to be int-sized or pointer-sized.

It /should/ be expecting SQLPOINTER (well, SQLSetConnectAttr expects
SQLPOINTER, and SQLSetConnectOption maps directly to it according to the
spec -
http://msdn.microsoft.com/library/default.asp?url=3D/library /en-us/odbc/ht
m/odbcsqlsetconnectattr.asp)

> I took a quick look at the unixODBC sources (2.0.4 which is=20
> what I have
> handy, I know it's a bit old) and got completely confused: I see the
> parameter declared as SQLUINTEGER in some places and UDWORD in others.
> Anyone know that code base well enough to be certain which place is
> definitive?

Not I. Our code seems to be a mess of types as well :-(

Regards, Dave.

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

Re: Odbcapi30.c - 64 bit compiler warning cleanup

am 27.01.2006 16:09:46 von Ludek Finstrle

> > >> The problem with this is that it creates an ABI breakage.
> >
> > > Is that actually a problem given that apps should link to the driver
> > > manager (which can dynamically load any version of any driver), not
> > > directly to the driver itself?
> >
> > Hm, good point. So the question then becomes whether the
> > driver manager
> > is expecting this parameter to be int-sized or pointer-sized.
>
> It /should/ be expecting SQLPOINTER (well, SQLSetConnectAttr expects
> SQLPOINTER, and SQLSetConnectOption maps directly to it according to the
> spec -
> http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/odbc/ht
> m/odbcsqlsetconnectattr.asp)

PGAPI_SetConnectOption is private hidden function. It's called from
SQL* functions which are public - exported (I'm sorry I'm using terms
from OOP but I don't know the right one). No one who follows ODBC
specification may use functions which doesn't begin with SQL.
The parameter for SQLSetConnectAttr (from which is
PGAPI_SetConnectOption mainly called) is SQLPOINTER.

I check whole code to calling PGAPI_SetConnectOption so there could be
no problem with it.

> > I took a quick look at the unixODBC sources (2.0.4 which is
> > what I have
> > handy, I know it's a bit old) and got completely confused: I see the
> > parameter declared as SQLUINTEGER in some places and UDWORD in others.
> > Anyone know that code base well enough to be certain which place is
> > definitive?
>
> Not I. Our code seems to be a mess of types as well :-(

There is more types in psqlodbc like UInt4, int, ...
I think the best API manual is on MS web (Dave's link above). unixODBC
follows it.

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster