Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PgArray equals implementation #3170

Open
1 of 2 tasks
An1s9n opened this issue Mar 21, 2024 · 2 comments
Open
1 of 2 tasks

PgArray equals implementation #3170

An1s9n opened this issue Mar 21, 2024 · 2 comments

Comments

@An1s9n
Copy link

An1s9n commented Mar 21, 2024

I'm submitting an issue about java driver

  • bug report
  • feature request

Describe the issue
PgArray does not override equals method and it causes faults in test assertions (arrays are same, but different according to equals method). Is it possible to add equals override for PgArray, please?

Driver Version?
any

Java Version?
any

OS Version?
any

PostgreSQL Version?
any

To Reproduce
Steps to reproduce the behaviour: just see PgArray

Expected behaviour
If equals would be overridden then assertions would pass successfully

@davecramer
Copy link
Member

Pull requests are welcome

Dawnliving added a commit to Dawnliving/pgjdbc that referenced this issue Mar 21, 2024
Dawnliving added a commit to Dawnliving/pgjdbc that referenced this issue Mar 22, 2024
Dawnliving added a commit to Dawnliving/pgjdbc that referenced this issue Mar 22, 2024
Dawnliving added a commit to Dawnliving/pgjdbc that referenced this issue Mar 29, 2024
@bokken
Copy link
Member

bokken commented Mar 29, 2024

Can we start by defining in plain English what should define 2 PgArray instances as equal?
Should it mean they represent the same logical contents?
Should it mean the contain the exact same literal data?

If a select statement which returns an array is executed 10 times in a row, should all of the PgArray instances be considered equal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants