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

Precompile SELECT set_config to SET #7810

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

aljazerzen
Copy link
Contributor

@aljazerzen aljazerzen commented Sep 27, 2024

This is an optimistic PR that might not be reasonable to fully implement.

I've added a pre-compilation step that turns SELECT set_config into SET commands.

The problem now is that SELECT set_config:

  • returns CommandComplete('SET'), but it should return CommandComplete('') (this can be solved easily),
  • returns no result, but it should return a single row with a single column that is the value of the setting that was just set (this would be harder to solve),

We don't have a framework for injecting result tuples for SET commands that would work in general (for frontend-only actions and the normal ones). So I'm not sure if I should continue here.

The pro is that we would then support all basic set_config usages (top-level, without complicated SELECT clauses).

The cons is that is needed only now, for solving #7804, where we need to just ignore a pg setting.

@aljazerzen
Copy link
Contributor Author

The conclusion here is that:

  • we need to get pg_dump working now, so let's just add another workaround instead of this PR,
  • I will come back to this later, hopefully after pgcon.pxd will be rewritten in Rust.

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.

1 participant