[ psqlodbc-Bugs-1000567 ] Discrepant results versus other connections

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1000567 ] Discrepant results versus other connections
Date: 2006-03-18 21:53:33
Message-ID: 20060318215333.485F41033834@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Bugs item #1000567, was opened at 2006-02-24 18:23
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000567&group_id=1000125

Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Hiroshi Inoue (hinoue)
Summary: Discrepant results versus other connections

Initial Comment:
I've found a case where psqlODBC doesn't match JODBC, psql, or Perl-DBD::Pg. It looks like a numeric/floating point issue perhaps?

Using psqlodbc-08.00.0100 and psqlodbc-08.01.0200. Both compiled as 64bit, Postgres 8.0.1.

Sample code:

CREATE OR REPLACE FUNCTION plpgsql_multiply(numeric, float) RETURNS numeric AS $$
DECLARE
BEGIN
RETURN $1 * $2;
END
$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION perl_ge(numeric, float) RETURNS bool AS $$
if ($_[0] >= $_[1]) { return true; }
return false;
$$ LANGUAGE plperl;

SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1));

-- true using JODBC, DBD::Pg, psql
-- false using ODBC

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-16 15:46

Message:
Perfect, this has solved the problem. The output now matches the output of the other connctions.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-16 05:20

Message:
You can add the *ConnSettings* connetion option
in you DSN, i.e add the following line

ConnSettings = set extra_float_digits to 0

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-15 17:29

Message:
That works-- but unfortunately, the production code isn't as simple as the case above.

Is there a way, (a compile flag?) to disable the 'set extra_float_digits = 2' default behavior?

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-15 05:43

Message:
Thanks for the reproducible test case.
Hmm the handling of floating point numbers with fixed point numbers is very delicate. How about
changing the line below in the function plpgsql_multiply
RETURN $1 * $2;
by
RETURN ($1 * $2)::numeric;
?

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-14 21:21

Message:
Perhaps I've answered my own question: it appears to be caused by the connection setting 'extra_float_digits' to 2. If I do that in psql, I can reproduce this result as follows:

df_mirror=# show extra_float_digits;
extra_float_digits
--------------------
0
(1 row)

df_mirror=# set extra_float_digits = 2;
SET
df_mirror=# SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1));
perl_ge
---------
f
(1 row)

df_mirror=# set extra_float_digits = 0;
SET
df_mirror=# SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1));
perl_ge
---------
t
(1 row)

That being said, if the solution is to change this, where would stop this set statement from happening by default?

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-14 21:08

Message:
Ahh, there it is, thank you for the tip.

mylog content:
CC_connect: entering...
CC_connect(): DSN = 'smartalectest', server = 'sqltest', port = '5432', database = 'df_mirror', username = 'postgres', password='xxxxx'
connecting to the server socket...
connection to the server socket succeeded.
sizeof startup packet = 292
sent the authentication block.
sent the authentication block successfully.
gonna do authentication
read 9, global_socket_buffersize=8192
auth got 'R'
areq = 5
in AUTH_REQ_MD5
read 15, global_socket_buffersize=8192
auth got 'R'
areq = 0
auth got 'K'
auth got 'Z'
sending an empty query...
send_query(): conn=1120976, query=' '
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 3, global_socket_buffersize=8192
send_query: got id = 'I'
send_query: got id = 'Z'
QResult: in DESTRUCTOR
QResult: free memory in, fcount=0
QResult: free memory out
QResult: exit DESTRUCTOR
empty query seems to be OK.
CC_lookup_pg_version: entering...
PGAPI_AllocStmt: entering...
**** PGAPI_AllocStmt: hdbc = 1120976, stmt = 1151600
CC_add_statement: self=1120976, stmt=1151600
PGAPI_ExecDirect: entering...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
**** PGAPI_ExecDirect: hstmt=1151600, statement='select version()'
PGAPI_ExecDirect: calling PGAPI_Execute...
PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=16, stmt='select version()'
stmt_with_params = 'select version()'
Sending SELECT statement on stmt=1151600, cursor_name='SQL_CUR100119270'
send_query(): conn=1120976, query='select version()'
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 114, global_socket_buffersize=8192
send_query: got id = 'P'
send_query: got id = 'T'
QR_fetch_tuples: cursor = '', self->cursor=0
num_fields = 1
READING ATTTYPMOD
CI_read_fields: fieldname='version', adtid=25, adtsize=-1, atttypmod=-1
QR_fetch_tuples: past CI_read_fields: num_fields = 1
MALLOC: tuple_size = 100, size = 1600
next_tuple: inTuples = true, falling through: fcount = 101, fetch_count = 101
qresult: len=71, buffer='PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
end of tuple list -- setting inUse to false: this = 1152432
_next_tuple: 'C' fetch_total = 1 & this_fetch = 1
send_query: got id = 'Z'
done sending the query:
extend_column_bindings: entering ... self=1151808, bindings_allocated=0, num_columns=1
exit extend_column_bindings
PGAPI_ExecDirect: returned 0 from PGAPI_Execute
PGAPI_Fetch: stmt = 1151600, stmt->result= 1152432
manual_result = 0, use_declarefetch = 0
**** SC_fetch: manual_result
extend_getdata_info: entering ... self=1152144, gdata_allocated=0, num_columns=1
exit extend_gdata_info
fetch: cols=1, lf=0, opts = 1151808, opts->bindings = 1074896, buffer[] = 0
PGAPI_GetData: enter, stmt=1151600
num_rows = 1
value = 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
**** PGAPI_GetData: icol = 0, fCType = 1, field_type = 25, value = 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
copy_and_convert: field_type = 25, fctype = 1, value = 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2', cbValueMax=128
DEFAULT: len = 71, ptr = 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
SQL_C_CHAR, default: len = 71, cbValueMax = 128, rgbValueBindRow = 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
Got the PostgreSQL version string: 'PostgreSQL 8.0.1 on sparc-sun-solaris2.9, compiled by GCC gcc (GCC) 3.2'
Extracted PostgreSQL version number: '8.0'
PGAPI_FreeStmt: entering...hstmt=1151600, fOption=1
QResult: in DESTRUCTOR
QResult: free memory in, fcount=1
row = 0, num_fields = 1
free [lf=0] 1159392
QResult: free memory out
QResult: exit DESTRUCTOR
SC_Destructor: self=1151600, self->result=0, self->hdbc=1120976
ARDFields_free 119340 bookmark=106670ARD_unbind_cols freeall=1 allocated=1 bindings=1066d0reset_a_column_binding: entering ... self=1151808, bindings_allocated=1, icol=1
APD_free_params: ENTER, self=1151992
IPD_free_params: ENTER, self=1152088
GDATA_unbind_cols freeall=1 allocated=1 gdata=106700SC_Destructor: EXIT
CC_send_settings: entering...
PGAPI_AllocStmt: entering...
**** PGAPI_AllocStmt: hdbc = 1120976, stmt = 1151600
CC_add_statement: self=1120976, stmt=1151600
PGAPI_ExecDirect: entering...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
**** PGAPI_ExecDirect: hstmt=1151600, statement='set DateStyle to 'ISO''
PGAPI_ExecDirect: calling PGAPI_Execute...
PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=22, stmt='set DateStyle to 'ISO''
stmt_with_params = 'set DateStyle to 'ISO''
it's NOT a select statement: stmt=1151600
send_query(): conn=1120976, query='set DateStyle to 'ISO''
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 6, global_socket_buffersize=8192
send_query: got id = 'C'
send_query: ok - 'C' - SET
send_query: setting cmdbuffer = 'SET'
send_query: returning res = 1152432
send_query: got id = 'Z'
PGAPI_ExecDirect: returned 0 from PGAPI_Execute
CC_send_settings: result 0, status 1 from set DateStyle
PGAPI_ExecDirect: entering...
recycle statement: self= 1151600
QResult: in DESTRUCTOR
QResult: free memory in, fcount=0
QResult: free memory out
QResult: exit DESTRUCTOR
PDATA_free_params: ENTER, self=1152248
**** PGAPI_ExecDirect: hstmt=1151600, statement='set geqo to 'OFF''
PGAPI_ExecDirect: calling PGAPI_Execute...
PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=17, stmt='set geqo to 'OFF''
stmt_with_params = 'set geqo to 'OFF''
it's NOT a select statement: stmt=1151600
send_query(): conn=1120976, query='set geqo to 'OFF''
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 6, global_socket_buffersize=8192
send_query: got id = 'C'
send_query: ok - 'C' - SET
send_query: setting cmdbuffer = 'SET'
send_query: returning res = 1152432
send_query: got id = 'Z'
PGAPI_ExecDirect: returned 0 from PGAPI_Execute
CC_send_settings: result 0, status 1 from set geqo
PGAPI_ExecDirect: entering...
recycle statement: self= 1151600
QResult: in DESTRUCTOR
QResult: free memory in, fcount=0
QResult: free memory out
QResult: exit DESTRUCTOR
PDATA_free_params: ENTER, self=1152248
**** PGAPI_ExecDirect: hstmt=1151600, statement='set extra_float_digits to 2'
PGAPI_ExecDirect: calling PGAPI_Execute...
PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=27, stmt='set extra_float_digits to 2'
stmt_with_params = 'set extra_float_digits to 2'
it's NOT a select statement: stmt=1151600
send_query(): conn=1120976, query='set extra_float_digits to 2'
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 6, global_socket_buffersize=8192
send_query: got id = 'C'
send_query: ok - 'C' - SET
send_query: setting cmdbuffer = 'SET'
send_query: returning res = 1152432
send_query: got id = 'Z'
PGAPI_ExecDirect: returned 0 from PGAPI_Execute
CC_send_settings: result 0, status 1 from set extra_float_digits
PGAPI_FreeStmt: entering...hstmt=1151600, fOption=1
QResult: in DESTRUCTOR
QResult: free memory in, fcount=0
QResult: free memory out
QResult: exit DESTRUCTOR
SC_Destructor: self=1151600, self->result=0, self->hdbc=1120976
ARDFields_free 119340 bookmark=1066a0ARD_unbind_cols freeall=1 allocated=0 bindings=0APD_free_params: ENTER, self=1151992
IPD_free_params: ENTER, self=1152088
GDATA_unbind_cols freeall=1 allocated=0 gdata=0SC_Destructor: EXIT
CC_lookup_lo: entering...
PGAPI_AllocStmt: entering...
**** PGAPI_AllocStmt: hdbc = 1120976, stmt = 1151600
CC_add_statement: self=1120976, stmt=1151600
PGAPI_ExecDirect: entering...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
**** PGAPI_ExecDirect: hstmt=1151600, statement='select oid from pg_type where typname='lo''
PGAPI_ExecDirect: calling PGAPI_Execute...
PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=42, stmt='select oid from pg_type where typname='lo''
stmt_with_params = 'select oid from pg_type where typname='lo''
Sending SELECT statement on stmt=1151600, cursor_name='SQL_CUR100119270'
send_query(): conn=1120976, query='select oid from pg_type where typname='lo''
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 33, global_socket_buffersize=8192
send_query: got id = 'P'
send_query: got id = 'T'
QR_fetch_tuples: cursor = '', self->cursor=0
num_fields = 1
READING ATTTYPMOD
CI_read_fields: fieldname='oid', adtid=26, adtsize=4, atttypmod=-1
QR_fetch_tuples: past CI_read_fields: num_fields = 1
MALLOC: tuple_size = 100, size = 1600
next_tuple: inTuples = true, falling through: fcount = 101, fetch_count = 101
end of tuple list -- setting inUse to false: this = 1152432
_next_tuple: 'C' fetch_total = 0 & this_fetch = 0
_next_tuple: 'C': DONE (fcount == 0)
send_query: got id = 'Z'
done sending the query:
extend_column_bindings: entering ... self=1151808, bindings_allocated=0, num_columns=1
exit extend_column_bindings
PGAPI_ExecDirect: returned 0 from PGAPI_Execute
PGAPI_Fetch: stmt = 1151600, stmt->result= 1152432
manual_result = 0, use_declarefetch = 0
PGAPI_FreeStmt: entering...hstmt=1151600, fOption=1
QResult: in DESTRUCTOR
QResult: free memory in, fcount=0
QResult: free memory out
QResult: exit DESTRUCTOR
SC_Destructor: self=1151600, self->result=0, self->hdbc=1120976
ARDFields_free 119340 bookmark=106670ARD_unbind_cols freeall=1 allocated=1 bindings=1066a0reset_a_column_binding: entering ... self=1151808, bindings_allocated=1, icol=1
APD_free_params: ENTER, self=1151992
IPD_free_params: ENTER, self=1152088
GDATA_unbind_cols freeall=1 allocated=0 gdata=0SC_Destructor: EXIT
CC_lookup_characterset: entering...
send_query(): conn=1120976, query='select pg_client_encoding()'
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 63, global_socket_buffersize=8192
send_query: got id = 'P'
send_query: got id = 'T'
QR_fetch_tuples: cursor = '', self->cursor=0
num_fields = 1
READING ATTTYPMOD
CI_read_fields: fieldname='pg_client_encoding', adtid=19, adtsize=64, atttypmod=-1
QR_fetch_tuples: past CI_read_fields: num_fields = 1
MALLOC: tuple_size = 100, size = 1600
next_tuple: inTuples = true, falling through: fcount = 101, fetch_count = 101
qresult: len=9, buffer='SQL_ASCII'
end of tuple list -- setting inUse to false: this = 1151600
_next_tuple: 'C' fetch_total = 1 & this_fetch = 1
send_query: got id = 'Z'
QResult: in DESTRUCTOR
QResult: free memory in, fcount=1
row = 0, num_fields = 1
free [lf=0] 1072080
QResult: free memory out
QResult: exit DESTRUCTOR
CC_connect: returning...
PGAPI_Connect: returning...
[SQLGetFunctions]PGAPI_GetFunctions: entering...1
[SQLGetFunctions]PGAPI_GetFunctions: entering...2
[SQLGetFunctions]PGAPI_GetFunctions: entering...1001
[SQLGetFunctions]PGAPI_GetFunctions: entering...3
[SQLGetFunctions]PGAPI_GetFunctions: entering...4
[SQLGetFunctions]PGAPI_GetFunctions: entering...1002
[SQLGetFunctions]PGAPI_GetFunctions: entering...72
[SQLGetFunctions]PGAPI_GetFunctions: entering...55
[SQLGetFunctions]PGAPI_GetFunctions: entering...24
[SQLGetFunctions]PGAPI_GetFunctions: entering...5
[SQLGetFunctions]PGAPI_GetFunctions: entering...1003
[SQLGetFunctions]PGAPI_GetFunctions: entering...6
[SQLGetFunctions]PGAPI_GetFunctions: entering...56
[SQLGetFunctions]PGAPI_GetFunctions: entering...40
[SQLGetFunctions]PGAPI_GetFunctions: entering...7
[SQLGetFunctions]PGAPI_GetFunctions: entering...1004
[SQLGetFunctions]PGAPI_GetFunctions: entering...57
[SQLGetFunctions]PGAPI_GetFunctions: entering...8
[SQLGetFunctions]PGAPI_GetFunctions: entering...58
[SQLGetFunctions]PGAPI_GetFunctions: entering...9
[SQLGetFunctions]PGAPI_GetFunctions: entering...41
[SQLGetFunctions]PGAPI_GetFunctions: entering...1005
[SQLGetFunctions]PGAPI_GetFunctions: entering...11
[SQLGetFunctions]PGAPI_GetFunctions: entering...12
[SQLGetFunctions]PGAPI_GetFunctions: entering...59
[SQLGetFunctions]PGAPI_GetFunctions: entering...13
[SQLGetFunctions]PGAPI_GetFunctions: entering...1021
[SQLGetFunctions]PGAPI_GetFunctions: entering...60
[SQLGetFunctions]PGAPI_GetFunctions: entering...1006
[SQLGetFunctions]PGAPI_GetFunctions: entering...16
[SQLGetFunctions]PGAPI_GetFunctions: entering...1007
[SQLGetFunctions]PGAPI_GetFunctions: entering...17
[SQLGetFunctions]PGAPI_GetFunctions: entering...43
[SQLGetFunctions]PGAPI_GetFunctions: entering...1008
[SQLGetFunctions]PGAPI_GetFunctions: entering...1009
[SQLGetFunctions]PGAPI_GetFunctions: entering...1010
[SQLGetFunctions]PGAPI_GetFunctions: entering...1012
[SQLGetFunctions]PGAPI_GetFunctions: entering...44
[SQLGetFunctions]PGAPI_GetFunctions: entering...45
[SQLGetFunctions]PGAPI_GetFunctions: entering...1014
[SQLGetFunctions]PGAPI_GetFunctions: entering...47
[SQLGetFunctions]PGAPI_GetFunctions: entering...61
[SQLGetFunctions]PGAPI_GetFunctions: entering...62
[SQLGetFunctions]PGAPI_GetFunctions: entering...63
[SQLGetFunctions]PGAPI_GetFunctions: entering...18
[SQLGetFunctions]PGAPI_GetFunctions: entering...48
[SQLGetFunctions]PGAPI_GetFunctions: entering...64
[SQLGetFunctions]PGAPI_GetFunctions: entering...19
[SQLGetFunctions]PGAPI_GetFunctions: entering...65
[SQLGetFunctions]PGAPI_GetFunctions: entering...66
[SQLGetFunctions]PGAPI_GetFunctions: entering...67
[SQLGetFunctions]PGAPI_GetFunctions: entering...49
[SQLGetFunctions]PGAPI_GetFunctions: entering...20
[SQLGetFunctions]PGAPI_GetFunctions: entering...1016
[SQLGetFunctions]PGAPI_GetFunctions: entering...21
[SQLGetFunctions]PGAPI_GetFunctions: entering...1017
[SQLGetFunctions]PGAPI_GetFunctions: entering...1018
[SQLGetFunctions]PGAPI_GetFunctions: entering...1019
[SQLGetFunctions]PGAPI_GetFunctions: entering...22
[SQLGetFunctions]PGAPI_GetFunctions: entering...68
[SQLGetFunctions]PGAPI_GetFunctions: entering...1020
[SQLGetFunctions]PGAPI_GetFunctions: entering...52
[SQLGetFunctions]PGAPI_GetFunctions: entering...53
[SQLGetFunctions]PGAPI_GetFunctions: entering...70
[SQLGetFunctions]PGAPI_GetFunctions: entering...54
[SQLGetFunctions]PGAPI_GetFunctions: entering...1011
[SQLGetInfo(30)]PGAPI_GetInfo: entering...fInfoType=77
PGAPI_GetInfo: p='03.00', len=5, value=0, cbMax=20
[SQLGetInfo(30)]PGAPI_GetInfo: entering...fInfoType=10000
CONN ERROR: func=PGAPI_GetInfo30, desc='', errnum=209, errmsg='Unrecognized key passed to SQLGetInfo30.'
CONN ERROR: func=SQLGetInfo30, desc='', errnum=209, errmsg='Unrecognized key passed to SQLGetInfo30.'
[[SQLAllocHandle]]PGAPI_AllocStmt: entering...
**** PGAPI_AllocStmt: hdbc = 1120976, stmt = 1151600
CC_add_statement: self=1120976, stmt=1151600
[[SQLGetStmtAttr]] Handle=1151600 10010
PGAPI_GetStmtAttr Handle=1151600 10010
[[SQLGetStmtAttr]] Handle=1151600 10011
PGAPI_GetStmtAttr Handle=1151600 10011
[[SQLGetStmtAttr]] Handle=1151600 10012
PGAPI_GetStmtAttr Handle=1151600 10012
[[SQLGetStmtAttr]] Handle=1151600 10013
PGAPI_GetStmtAttr Handle=1151600 10013
[SQLPrepare]PGAPI_Prepare: entering...
**** PGAPI_Prepare: STMT_ALLOCATED, copy
[SQLExecute]PGAPI_Execute: entering...
PGAPI_Execute: clear errors...
recycle statement: self= 1151600
PDATA_free_params: ENTER, self=1152248
Exec_with_parameters_resolved: copying statement params: trans_status=1, len=49, stmt='SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1)); '
stmt_with_params = 'SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1)); '
Sending SELECT statement on stmt=1151600, cursor_name='SQL_CUR100119270'
send_query(): conn=1120976, query='SELECT perl_ge(47.3, plpgsql_multiply(43, 1.1)); '
send_query: done sending query
in QR_Constructor
exit QR_Constructor
read 44, global_socket_buffersize=8192
send_query: got id = 'P'
send_query: got id = 'T'
QR_fetch_tuples: cursor = '', self->cursor=0
num_fields = 1
READING ATTTYPMOD
CI_read_fields: fieldname='perl_ge', adtid=16, adtsize=1, atttypmod=-1
QR_fetch_tuples: past CI_read_fields: num_fields = 1
MALLOC: tuple_size = 100, size = 1600
next_tuple: inTuples = true, falling through: fcount = 101, fetch_count = 101
qresult: len=1, buffer='f'
end of tuple list -- setting inUse to false: this = 1152432
_next_tuple: 'C' fetch_total = 1 & this_fetch = 1
send_query: got id = 'Z'
done sending the query:
extend_column_bindings: entering ... self=1151808, bindings_allocated=0, num_columns=1
exit extend_column_bindings
[SQLNumResultCols]PGAPI_NumResultCols: entering...
SC_pre_execute: status = 3
PGAPI_NumResultCols: result = 1152432, status = 3, numcols = 1
[SQLNumResultCols]PGAPI_NumResultCols: entering...
SC_pre_execute: status = 3
PGAPI_NumResultCols: result = 1152432, status = 3, numcols = 1
[[SQLColAttribute]]PGAPI_ColAttributes: entering..col=1 6 len=0.
SC_pre_execute: status = 3
**** PGAPI_ColAtt: result = 1152432, status = 3, numcols = 1
colAttr: col 0 field_type = 16
PGAPI_ColAttributes: col 0, display_size= 1
[[SQLColAttribute]]PGAPI_ColAttributes: entering..col=1 18 len=301.
SC_pre_execute: status = 3
**** PGAPI_ColAtt: result = 1152432, status = 3, numcols = 1
colAttr: col 0 field_type = 16
PGAPI_ColAttr: COLUMN_NAME = 'perl_ge'
[[SQLColAttribute]]PGAPI_ColAttributes: entering..col=1 18 len=301.
SC_pre_execute: status = 3
**** PGAPI_ColAtt: result = 1152432, status = 3, numcols = 1
colAttr: col 0 field_type = 16
PGAPI_ColAttr: COLUMN_NAME = 'perl_ge'
[SQLNumResultCols]PGAPI_NumResultCols: entering...
SC_pre_execute: status = 3
PGAPI_NumResultCols: result = 1152432, status = 3, numcols = 1
[[SQLFetch]]PGAPI_ExtendedFetch: stmt=1151600
SQL_FETCH_NEXT: num_tuples=1, currtuple=-1
PGAPI_ExtendedFetch: new currTuple = -1
manual_result = 0, use_declarefetch = 0
**** SC_fetch: manual_result
extend_getdata_info: entering ... self=1152144, gdata_allocated=0, num_columns=1
exit extend_gdata_info
fetch: cols=1, lf=0, opts = 1151808, opts->bindings = 1074848, buffer[] = 0
[[SQLColAttribute]]PGAPI_ColAttributes: entering..col=1 6 len=0.
SC_pre_execute: status = 3
**** PGAPI_ColAtt: result = 1152432, status = 3, numcols = 1
colAttr: col 0 field_type = 16
PGAPI_ColAttributes: col 0, display_size= 1
[[SQLColAttribute]]PGAPI_ColAttributes: entering..col=1 18 len=301.
SC_pre_execute: status = 3
**** PGAPI_ColAtt: result = 1152432, status = 3, numcols = 1
colAttr: col 0 field_type = 16
PGAPI_ColAttr: COLUMN_NAME = 'perl_ge'
[SQLGetData]PGAPI_GetData: enter, stmt=1151600
num_rows = 1
value = 'f'
**** PGAPI_GetData: icol = 0, fCType = 1, field_type = 16, value = 'f'
copy_and_convert: field_type = 16, fctype = 1, value = 'f', cbValueMax=301
PG_TYPE_BOOL: rgbValueBindRow = '0'
[[SQLFetch]]PGAPI_ExtendedFetch: stmt=1151600
SQL_FETCH_NEXT: num_tuples=1, currtuple=0
[SQLRowCount]PGAPI_RowCount: entering...
RowCount=1
[SQLMoreResults]PGAPI_MoreResults: entering...
[[SQLFreeHandle]]PGAPI_FreeStmt: entering...hstmt=1151600, fOption=1
QResult: in DESTRUCTOR
QResult: free memory in, fcount=1
row = 0, num_fields = 1
free [lf=0] 1072176
QResult: free memory out
QResult: exit DESTRUCTOR
SC_Destructor: self=1151600, self->result=0, self->hdbc=1120976
ARDFields_free 119340 bookmark=106670ARD_unbind_cols freeall=1 allocated=1 bindings=1066a0reset_a_column_binding: entering ... self=1151808, bindings_allocated=1, icol=1
APD_free_params: ENTER, self=1151992
IPD_free_params: ENTER, self=1152088
GDATA_unbind_cols freeall=1 allocated=1 gdata=1066d0SC_Destructor: EXIT
[SQLDisconnect]PGAPI_Disconnect: entering...

----------------------------------------------------------------------

Comment By: Hiroshi Saito (h-saito)
Date: 2006-03-14 13:45

Message:
Output of Debug is performed as follows.

bsd2% odbc_config --odbcini
/usr/local/etc/odbc.ini

[ODBC Data Sources]
PostgreSQLw = PostgreSQLw

[PostgreSQLw]
Driver = /usr/local/lib/psqlodbcw.so
;Description = PostgreSQLW
;Servername = localhost
Servername = 192.168.0.2
Username = saito
Database = saito
SSLmode = prefer
Port = 5432
Protocol = 7.2
CommLog = true
Debug = 1

mylog output is in this place.
/tmp/mylog_saito57977.log

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-13 20:41

Message:
Again I apologize, but hopefully this can help someone else out, too. I've set Debug=1, now where do I look for the mylog output?

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-13 04:48

Message:
Please set "Debug=1" in your ODBC.ini.

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-09 19:37

Message:
Please forgive my ignorance, but how do I get mylog input?

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-09 14:20

Message:
Can you get the mylog output ?

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-08 19:22

Message:
IT tells me our driver manager is: unixODBC-2.2.10-64bit

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-08 14:36

Message:
What driver manager are you using ?
Is it a 64bit version ?

----------------------------------------------------------------------

Comment By: Bryce Baril (vaticide)
Date: 2006-03-06 16:54

Message:
I'm using iSQL for testing, but the problem was discovered using SAS.

In iSQL I simply use the SELECT statement above to get the result, if that is what you are asking.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-03-01 23:40

Message:
How are you calling the function concretely using ODBC ?

----------------------------------------------------------------------

You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000567&group_id=1000125

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2006-03-18 21:56:11 [ psqlodbc-Bugs-1000563 ] Rollback in manual transaction
Previous Message Bob Pawley 2006-03-18 19:41:48 Tutorial