ODBC issue with aggregate fields (SUM)

Поиск
Список
Период
Сортировка
От Tim Nelson
Тема ODBC issue with aggregate fields (SUM)
Дата
Msg-id 42FA0A54.1090101@phreaker.net
обсуждение исходный текст
Ответы Re: ODBC issue with aggregate fields (SUM)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: "John D. Burger"
Дата:
Сообщение: Re: Case sensitivity
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: ODBC issue with aggregate fields (SUM)