ODBC issue with aggregate fields (SUM)

From: Tim Nelson <timnelson(at)phreaker(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: ODBC issue with aggregate fields (SUM)
Date: 2005-08-10 14:08:20
Message-ID: 42FA0A54.1090101@phreaker.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We do the following test on the client site :
A)Using SQLExecDirect with this query
------------
SELECT SUM("str_sls_totals"."strsl_net_dly"),
"dw_trans_type"."trans_type", "flash_dates"."year_number",
"flash_dates"."month_number", "flash_dates"."day"
FROM "dw_trans_type", "str_sls_totals", "flash_dates"
WHERE ("flash_dates"."dt" = "str_sls_totals"."strsl_per_dt") AND
("dw_trans_type"."trans_type" =
"str_sls_totals"."strsl_tran_type") AND
( NOT("str_sls_totals"."strsl_tran_type" IN (5,6)) ) AND
( "dw_trans_type"."trans_type" = 4 ) AND
( "flash_dates"."year_number" = 2005 ) AND
( "flash_dates"."month_number" = 8 ) AND
( "flash_dates"."day" = 13 )
GROUP BY "dw_trans_type"."trans_type", "flash_dates"."year_number",
"flash_dates"."month_number", "flash_dates"."day"
------------
Extract the column size with SQLColAttributes
SQLColAttributes:
In: hstmt = 0x00992148, icol = 1,
fDescType = SQL_COLUMN_DISPLAY_SIZE=6, rgbDesc = -892679478,
cbDescMax = 300, pcbDesc = -13622,
pfDesc = 0x00152C90, Description Type = SQL_C_SLONG=-16
Return: SQL_SUCCESS=0
Out: *pfDesc = 20
------------

So the size of SUM("str_sls_totals"."strsl_net_dly") is 20. When we
change the year to 2004 the size is returned as 30 ! ! ! Is this by
design or a bug.

Postgres 7.3.4, ODBC driver 7.3.200.

Thanks for any input you have.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-08-10 14:38:47 Re: ODBC issue with aggregate fields (SUM)
Previous Message John D. Burger 2005-08-10 13:53:23 Re: Case sensitivity