postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
14+ messages / 3 participants
[nested] [flat]

* [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-11-26 13:25 "raddakal (@raddakal)" <[email protected]>
  0 siblings, 0 replies; 14+ messages in thread

From: raddakal (@raddakal) @ 2024-11-26 13:25 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Hello,

Its a very common use case where an explicit primary key is not defined on the table but instead rely on the unique index. The ODBC driver is expected to return the columns that are of the UNIQUE index when SQLSpecialColumns ODBCAPI is called.

[SQLSpecialColumns.zip](https://github.com/user-attachments/files/17919927/SQLSpecialColumns.zip)

Environment details:
--------------------

OS: 
OEL8 Linux 64bit (el8uek.x86_64)

Database: 
Yugabyte DB 
PostgreSQL
Version 11.02.0001 PostgreSQL 11.2-YB-2024.1.1.0-b0
ODBC Version 03.52.0000

Driver:
Driver Information:
psqlodbcw.so
Version 17.00.0002
ODBC Version 03.51.


I have attached SQLSpecialColumns.zip which contains the standalone ODBC program along with the detailed steps to reproduce the issue.


Our major release is blocked because of this issue. 
A quick resolution/workaround would be highly appreciated.


Thanks.

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-11-29 13:54 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2024-11-29 13:54 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

What product are you releasing ?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-12-02 07:52 ` "raddakal (@raddakal)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: raddakal (@raddakal) @ 2024-12-02 07:52 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

The reported issue is not just confined to YugaByteDB but it is seen with PostgreSQL database as well.

I am part of Oracle and We certify native ODBC driver for PostgreSQL with one of the Data integration products.  This issue is critical for us.


Thanks.

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-12-05 14:42 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2024-12-05 14:42 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

@raddakal OK, any chance you can provide a PR? Otherwise I will attempt to get this shortly

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-12-12 20:58 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2024-12-12 20:58 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Ok, I was able to reproduce the problem. Give me some time to see about a fix

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-12-29 15:38 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2024-12-29 15:38 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

I'm working on this. What would you expect for a multi-column primary key or unique index ?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2024-12-31 14:31 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2024-12-31 14:31 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

@raddakal can you test https://github.com/postgresql-interfaces/psqlodbc/pull/85 ?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-09 17:16 ` "abhi-555 (@abhi-555)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: abhi-555 (@abhi-555) @ 2025-01-09 17:16 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Hi Dave,

I work with @raddakal. I have tested the fix. It does not seem to be working. I have defined a unique index on the table and still SQLSpecialColumn does not return any value. Attaching the ODBC trace log and the DDL used

DDLs
create table public.test_col (id integer, name varchar(25));
create UNIQUE INDEX test_index ON public.test_col (name);

[REPL_odbctrace_1497393_01.log.zip](https://github.com/user-attachments/files/18364910/REPL_odbctrace_1497393_01.log.zip)


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-10 18:01 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2025-01-10 18:01 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Thanks, I'll take a look

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-13 12:23 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2025-01-13 12:23 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

@abhi-555 
In the Pull Request #85 I created a table testtab1 
```
CREATE TABLE test_special( id integer primary key, ival integer);
CREATE UNIQUE index test_special_ui on public.test_special(ival);
```
Then in the test you can see the output as:

```
Result set:
NULL	public	test_special	id	int4	int4	4	4	0	1
NULL	public	test_special	ival	int4	int4	4	4	0	1
```

Are you able to run the test on your end and see the same ?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-16 14:31 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2025-01-16 14:31 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Fixed by #85 

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-23 12:53 ` "abhi-555 (@abhi-555)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: abhi-555 (@abhi-555) @ 2025-01-23 12:53 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

Hi Dave,

The test case that you have is not correct. We need a fix for the case where the table should necessarily not have a primary key but unique indexes(can be one or multiple). Can you please check this case?

Regards,
Abhishek

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-01-23 16:11 ` "davecramer (@davecramer)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: davecramer (@davecramer) @ 2025-01-23 16:11 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

@abhi-555 This https://github.com/postgresql-interfaces/psqlodbc/pull/87 passes. It has 2 unique keys.

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB
@ 2025-02-18 10:51 ` "abhi-555 (@abhi-555)" <[email protected]>
  12 siblings, 0 replies; 14+ messages in thread

From: abhi-555 (@abhi-555) @ 2025-02-18 10:51 UTC (permalink / raw)
  To: postgresql-interfaces/psqlodbc <[email protected]>

I am still receiving zero rows upon running SQLSpecialColumns in the given test case in the shared standalone.
Can you please run the test case in the standalone [SQLSpecialColumns.zip](https://github.com/user-attachments/files/17919927/SQLSpecialColumns.zip) and confirm if this is working for you?

^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2025-02-18 10:51 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26 13:25 [postgresql-interfaces/psqlodbc] issue #79: SQLSpecialColumns ODBC API does not return Columns part of UNIQUE INDEX on YugaByteDB "raddakal (@raddakal)" <[email protected]>
2024-11-29 13:54 ` "davecramer (@davecramer)" <[email protected]>
2024-12-02 07:52 ` "raddakal (@raddakal)" <[email protected]>
2024-12-05 14:42 ` "davecramer (@davecramer)" <[email protected]>
2024-12-12 20:58 ` "davecramer (@davecramer)" <[email protected]>
2024-12-29 15:38 ` "davecramer (@davecramer)" <[email protected]>
2024-12-31 14:31 ` "davecramer (@davecramer)" <[email protected]>
2025-01-09 17:16 ` "abhi-555 (@abhi-555)" <[email protected]>
2025-01-10 18:01 ` "davecramer (@davecramer)" <[email protected]>
2025-01-13 12:23 ` "davecramer (@davecramer)" <[email protected]>
2025-01-16 14:31 ` "davecramer (@davecramer)" <[email protected]>
2025-01-23 12:53 ` "abhi-555 (@abhi-555)" <[email protected]>
2025-01-23 16:11 ` "davecramer (@davecramer)" <[email protected]>
2025-02-18 10:51 ` "abhi-555 (@abhi-555)" <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox