Skip to content

Conversation

@bpholt
Copy link
Member

@bpholt bpholt commented Nov 9, 2025

When using Amazon Redshift with Skunk v0.6.4, we're getting SkunkException: Just constructed an unknown completion 'SELECT' messages logged after running SELECT queries.

The modifications in Completion and CommandComplete are variations on the protocol to better support Redshift, which apparently doesn't return a count for a SELECT statement. The protocol documentation appears to say it should:

For a SELECT or CREATE TABLE AS command, the tag is SELECT rows where rows is the number of rows retrieved.

but comments in the JDBC driver state:

Parses CommandComplete (B) message. [The value being parsed] is in the format of COMMAND OID ROWS where both OID and ROWS are optional and COMMAND can have spaces within it, like CREATE TABLE.

so clients should probably be prepared to handle this?

Practically speaking, true Postgres servers do return row counts, but Redshift does not.

I'm not sure whether the other CommandComplete cases with required counts (Delete, Update, Insert, Copy, and Merge) should also be adjusted accordingly. I haven't tried those types of queries yet so I'm not sure whether Skunk emits the same warning.

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