This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.

From: rohtodeveloper <rohtodeveloper(at)outlook(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.
Date: 2014-10-20 11:56:00
Message-ID: BAY178-W6C29D0852800F04648E1BC4970@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Dear all,


I found a problem in the odbc driver on linux platfrom.

Inside the odbc driver,there is a function called check_client_encoding() ,however,there is also a function which has the same name inside the postgres.
once the two functions are in the same process, problems may occur,because the system may choose the wrong function to execute.
If I create a postgres's FUNCTION(myfunc()) using C language,and use this FUNCTION
to call the odbc driver(psqlodbcw.so),this problem may happen.

The follow picture explain the situation.

The declaration of the two functions are as follows:

➀ UCHAR *check_client_encoding(const UCHAR *sql_string);
② bool check_client_encoding(char **newval, void **extra, GucSource source);


I want to call the odbc's function "check_client_encoding",however it calls the postgres's function "check_client_encoding".
I think this probably is a bug.

Call you help me with this problem?

Thank you so much!



Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Michael Paquier 2014-10-20 12:06:24 Re: This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.
Previous Message Adrian Klaver 2014-10-17 15:04:58 Re: PostgreSQL crash at SQLColAttribute()