question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StatementType is always Select when specifying SchemaOnly

See original GitHub issue

Steps to reproduce

Use execute reader with SchemaOnly and a command like "begin; select 1; commit;"

The issue

All 3 statements have StatementType = Select. begin and end should have a StatementType of Other as they do when actually executing the command.

Further technical details

Npgsql version: 4.1.3 PostgreSQL version: 12.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
keramscommented, Mar 1, 2020

Yeah, I came to the same conclusion when looking at https://github.com/npgsql/npgsql/blob/dev/src/Npgsql/NpgsqlDataReader.cs#L564-L578 and seeing what comes out of Postgres. Too bad.

aren’t disposing the command

I know, it’s just sample 😃

0reactions
rojicommented, Mar 1, 2020

OK. Thanks for the raising the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NextResult hangs with SchemaOnly · Issue #2827
SchemaOnly) // timeouts and throws Npgsql.NpgsqlException (0x80004005): ... StatementType is always Select when specifying SchemaOnly #2873.
Read more >
Should the schema always be explicitly defined in the SQL ...
Earlier I had asked the question: Where (or how) should I define the schema in a select statement when using PostgreSQL? The answer...
Read more >
Npgsql changelog - Awesome .NET - LibHunt
... StatementType is always Select when specifying SchemaOnly (#2873) ... NET Framework performance counters (#2851); Make it easier to specify root CA, ...
Read more >
Npgsql v5.0.0-preview1 release notes (2020-10-13) | LibHunt
⬇️ Drop support for non-standard-conforming strings (#2931); StatementType is always Select when specifying SchemaOnly (#2873); Make ...
Read more >
AV | .NET Data Provider Classes
ExecuteReader(CommandBehavior.SchemaOnly) is supported for SELECT commands only. IngresCommand Class Declaration. The IngresCommand class declarations are:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found