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

From rohtodeveloper
Subject This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.
Date
Msg-id BAY178-W6C29D0852800F04648E1BC4970@phx.gbl
Whole thread Raw
Responses Re: This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.  (Michael Paquier <michael.paquier@gmail.com>)
List 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 languageand 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!

 

 

 

Attachment

pgsql-odbc by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: PostgreSQL crash at SQLColAttribute()
Next
From: Michael Paquier
Date:
Subject: Re: This may be a bug: odbc's function"check_client_encoding" have the same name with postgres's function.