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

Add configuration to skip querying of comp_oids #663

Merged
merged 5 commits into from
Nov 2, 2023

Conversation

jeregrine
Copy link
Contributor

It is becoming more common to use the "postgres wire protocol" for non-postgres projects. Many of these projects "support" the basic type bootstrap query, but do not support the Array+subquery syntax nor custom types.

I added a configuration option to pass to the repo/start_link that enables this:

skip_comp_oids: true|false

Appears to work in my test cases but its pretty difficult to write an actual test for this without mocking the connection? Any guidance would be helpful.

@josevalim
Copy link
Member

If we skip comp_oids, it means we will be unable to encode/decode records. If we want to go down this route, I think this option should be called "disable_composite_types". :)

@jeregrine
Copy link
Contributor Author

If we skip comp_oids, it means we will be unable to encode/decode records. If we want to go down this route, I think this option should be called "disable_composite_types". :)

sounds good, I'll change it on monday. I don't think people using postgrex for its wire protocol care too much about records or custom types at all.

@greg-rychlewski
Copy link
Member

Is it just turning subquery results into an array or do these databases not support arrays at all? I was thinking it might be worth benchmarking a join with array_agg, if that is generally supported?

@jeregrine
Copy link
Contributor Author

jeregrine commented Oct 28, 2023 via email

@jeregrine
Copy link
Contributor Author

@josevalim changes made.

@josevalim josevalim merged commit ab4265e into elixir-ecto:master Nov 2, 2023
9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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

Successfully merging this pull request may close these issues.

3 participants