Skip to content

Fix auto-preparation with SchemaOnly#4420

Merged
roji merged 1 commit intonpgsql:mainfrom
roji:AutoPrepareSchemaOnly
Apr 17, 2022
Merged

Fix auto-preparation with SchemaOnly#4420
roji merged 1 commit intonpgsql:mainfrom
roji:AutoPrepareSchemaOnly

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Apr 17, 2022

Fixes #4404

I debated whether to simply not auto-prepare for SchemaOnly, but finally decided it's an "execution" just like any other (and I'd rather not introduce more checks in the critical path because of SchemaOnly). But if you think we should go the other way I'm open to that too...

In any case, at some point we should look at maybe refactoring NpgsqlDataReader.{NextResult,NextResultSchemaOnly} since they contain lots of duplication.

@roji roji requested a review from vonzshik as a code owner April 17, 2022 20:21
@roji roji merged commit e914ed7 into npgsql:main Apr 17, 2022
@roji roji deleted the AutoPrepareSchemaOnly branch April 17, 2022 20:47
roji added a commit that referenced this pull request Apr 17, 2022
@roji
Copy link
Copy Markdown
Member Author

roji commented Apr 17, 2022

Backported to 6.0.4 via 12f1677

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.

Autopreparation doesn't work with CommandBehavior.SchemaOnly

2 participants