Skip to content
Discussion options

You must be logged in to vote

This is consistent with github.com/go-sql-driver/mysql but it leaves me wondering why.

Context is used to cancel potentially long running or blocking operations. Neither Rows.Next() nor Rows.Scan() are either. The context will block any further network reads. Presumably, the rows have already been read over the wire. If you were to change your generate_series query to something that returned so many rows that pgx had to read from the network multiple times then you would get a Rows.Next() => false.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MatthiasKunnen
Comment options

@jackc
Comment options

Answer selected by MatthiasKunnen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants