Re: psqlodbc - dayofweek and week functions are not supported but actually are

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: xsgao(at)aim(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: psqlodbc - dayofweek and week functions are not supported but actually are
Date: 2019-03-29 00:15:47
Message-ID: 41b8f5dd-b2f7-1e58-94c8-732bc2cdf387@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I would take care of the change.
Thanks.

Hiroshi Inoue

On 2019/03/28 3:43, xsgao(at)aim(dot)com wrote:
> When calling SQLGetInfo(SQL_TIMEDATE_FUNCTIONS), psqlodbc tells that
> WEEKOFDAY and WEEK are not supported. But in convert.c, it converts
> these two functions to extrat(dow/week from $1). So if you just send
> dayofweek() in a query, PostgreSQL will return correct values.
>
> So in this method of info.c:
>
> RETCODE  SQL_API
> PGAPI_GetInfo(HDBC hdbc,
>      SQLUSMALLINT fInfoType,
>      PTR rgbInfoValue,
>      SQLSMALLINT cbInfoValueMax,
>      SQLSMALLINT * pcbInfoValue)
>
> You need to append two more bits:
>
>   case SQL_TIMEDATE_FUNCTIONS: /* ODBC 1.0 */
>    len = 4;
>    value = (SQL_FN_TD_NOW | SQL_FN_TD_DAYOFWEEK | SQL_FN_TD_WEEK );
>    break;
>
> I am using  10.03.0000.
>
> thanks,
> Song X. Gao

---
このメールは、AVG によってウイルス チェックされています。
http://www.avg.com

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Mirko Klingmann 2019-04-03 12:36:25 Rename 64bit ODBC driver
Previous Message xsgao 2019-03-27 18:43:15 psqlodbc - dayofweek and week functions are not supported but actually are