Skip to content

docs: Correct the README's design notes on connections and results - #672

Merged
krlmlr merged 6 commits into
mainfrom
claude/fix-670-design-notes
Nov 29, 2026
Merged

krlmlr merged 6 commits into
mainfrom
claude/fix-670-design-notes

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

The "Design notes" section of the README said that the connection and result objects point to the same external pointer.
That is not true: a PqResult has its own ptr, created by result_create(conn@ptr, ...), and identical(con@ptr, res@ptr) is FALSE on CRAN 1.4.10.

  • "Design notes" now describes the C++ side correctly: a connection owns the libpq connection and remembers at most one current result set, and a result holds its own query's state behind its own external pointer.
    A new query while a result set is open warns, cancels the old query if it has not completed, and invalidates the old result.
    The driver and one-result-per-connection text is dropped, since "Goals and non-goals" already covers it.
  • "Goals and non-goals" says the same about a new query: it invalidates any open result set, cancelling its query if unfinished.
    This resolves the wording limitation accepted on docs: State the goals and non-goals #607.

README.Rmd is edited, and README.md and index.md are re-rendered.

Fixes #670.

https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc


Generated by Claude Code

The design notes claimed that connection and result objects point to the same external pointer.
A result has its own pointer, and the connection only remembers its current result set.
The driver and one-result-per-connection points are already in the goals and non-goals section.

Fixes #670.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Accepted limitations

None remain after two clean review rounds.

(Claude Code, session https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc)


Generated by Claude Code

@krlmlr
krlmlr merged commit 3824adf into main Nov 29, 2026
1 check passed
@krlmlr
krlmlr deleted the claude/fix-670-design-notes branch November 29, 2026 19:39
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.

README "Design notes" says connection and result share one external pointer

2 participants