hello Dave Cramer:
I'm sorry that my access to github is very unstable.
I will send you the source code change file(info-patch.c) and added test cases first(catalogfunctions-test.c, sampletables.sql).
This patch has been verified in my local environment can make enumeration of databases and procedurename work. The verification results are as follows:
OS vesion: CentOS7 3.10.0-957.el7.x86_64
PG server version: PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
psqlODBC version: psqlodbc-15.00.0000
unixODBC version: unixODBC 2.3.1
The regression (with added test cases) result:
With no path: is empty.
With the attached patch: SQLProcedures work well
Regards,
Liu Zhuang
At 2023-10-10 21:04:31, "Dave Cramer" <davecramer@postgres.rocks> wrote:
Hello,
Thanks for the patch, however it does not apply cleanly using patch or git apply
Dave Cramer
www.postgres.rocks
hello!
The attached patch fixed SQLProcedures two bug:
1. make enumeration of databases (catalogs in ODBC speak) work.
2. make enumeration of procedurename (procname in ODBC speak) work.
Step:
1. login postgres
2. create schem named schem1
3. set search_path TO schem1
4. create procedure named genre_insert_data
5. with odbc application(retcode = SQLProcedures (hstmt, NULL, 0, NULL, 0, (SQLCHAR *)"genre_insert_data", strlen("genre_insert_data"));)to get the genre_insert_data(step 4)
6. the result is empty.
7. After the patch is compiled using the attached patch, then run the odbc application(step 5), The result is shown below: