Re:Re: [PATCH] Allow catalogname (database) and procname (no under public schema) enumeration with SQLProcedures

Поиск
Список
Период
Сортировка
От 刘庄
Тема Re:Re: [PATCH] Allow catalogname (database) and procname (no under public schema) enumeration with SQLProcedures
Дата
Msg-id 76e935dd.6634.18b1eaa9716.Coremail.lzwp0521@163.com
обсуждение исходный текст
Ответ на Re: [PATCH] Allow catalogname (database) and procname (no under public schema) enumeration with SQLProcedures  (Dave Cramer <davecramer@postgres.rocks>)
Список pgsql-odbc
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).
 I will submit a PR postgresql-interfaces/psqlodbc (github.com)  when my network is stable.


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

Can you provide a PR postgresql-interfaces/psqlodbc (github.com) and add tests please ?


Dave Cramer
www.postgres.rocks


On Tue, 10 Oct 2023 at 01:09, 刘庄 <lzwp0521@163.com> wrote:

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:
     



  
Вложения

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: [PATCH] Allow catalogname (database) and procname (no under public schema) enumeration with SQLProcedures
Следующее
От: "Victor K."
Дата:
Сообщение: ODBC error