Skip to content

Display connection info and SSL status on startup - #815

Closed
NikolayS wants to merge 2 commits into
mainfrom
claude/add-welcome-message-ETNGh
Closed

Display connection info and SSL status on startup#815
NikolayS wants to merge 2 commits into
mainfrom
claude/add-welcome-message-ETNGh

Conversation

@NikolayS

Copy link
Copy Markdown
Owner

Summary

Enhanced the startup output to display connection details and SSL status information, matching the output format of psql.

Key Changes

  • Added connection information display during server startup using connection::connection_info() function
  • Added a blank line after the help text to improve output readability and formatting consistency

Implementation Details

The connection details are now printed immediately after the PostgreSQL server version information, providing users with visibility into their connection parameters and SSL status at startup. This aligns the application's output with standard psql behavior, making the startup experience more familiar to PostgreSQL users.

https://claude.ai/code/session_01NzCjbwZ5vrLXyLV442BRhq

@NikolayS

Copy link
Copy Markdown
Owner Author

REV Code Review Report

  • PR: Display connection info and SSL status on startup #815 — Display connection info and SSL status on startup
  • Author: NikolayS
  • AI-Assisted: Yes (Claude Code)
  • CI Status: ⏳ Partially pending — Lint ✅, Test ✅; Compatibility / Connection Tests / Coverage / Integration Tests / PostgreSQL Regress Tests still running

BLOCKING ISSUES (0)

No blocking issues found.


POTENTIAL ISSUES (1)

LOW src/main.rs:~882 — Resolved IP address exposed in startup output (confidence: 4/10)

When connecting via hostname (TCP), connection_info() includes the resolved IP address: on host "myhost" (address "10.1.2.3") at port "5432". This matches psql behaviour but may surprise users who expect internal IP addresses to stay invisible (e.g., in shared environments where terminal output is logged). No fix needed given it matches psql — just worth confirming it's intentional.


Summary

Area Findings Potential Filtered
CI/Pipeline 0 0 0
Security 0 0 0
Bugs 0 1 0
Tests 0 0 0
Guidelines 0 0 0
Docs 0 0 0

Notes:

  • connection_info() already has 5 unit tests in src/connection.rs covering TCP, TCP+TLS, socket, resolved-addr, and no-TLS paths — no new tests needed.
  • Change is correctly gated behind !cli.quiet && is_interactive — no output in scripted or quiet mode.
  • No credentials are included in the output (password is not part of ConnParams output).

SOC2 COMPLIANCE (2)

HIGH SOC2: Code Review — No assigned reviewer

Requirement: CC6.1 — Logical Access Controls
Action: Assign at least one reviewer other than @NikolayS before merging.

HIGH SOC2: Linked Issue — No issue reference in description

Requirement: CC8.1 — Change Management
Action: Add Closes #NNN or an issue URL to the description.


Overall: PASSED — Implementation is clean and correct. Confirm CI passes before merging.

REV-assisted review (AI analysis)

Comment thread src/main.rs
// Server version (full, including distro build info when present)
println!("Server: PostgreSQL {server_ver}");
// Connection details + SSL status — matching psql startup output.
println!("{}", connection::connection_info(&resolved));
claude added 2 commits April 13, 2026 06:42
Print "You are connected to database..." and SSL connection details
on initial interactive connection, matching psql's startup output.
Also add a trailing blank line after the help hint, like psql does.

Closes #789

https://claude.ai/code/session_01NzCjbwZ5vrLXyLV442BRhq
Point users to ~/.config/rpg/config.toml in both the "not configured"
and "key not set" cases so they know where to fix it.

https://claude.ai/code/session_01NzCjbwZ5vrLXyLV442BRhq
@NikolayS
NikolayS force-pushed the claude/add-welcome-message-ETNGh branch from 9d90446 to 2813af2 Compare April 13, 2026 06:42
@NikolayS

Copy link
Copy Markdown
Owner Author

Superseded by #817, which includes all changes from this PR (connection info display, config.toml hint, blank line) plus the CodeQL security fix that required using ConnDisplayInfo instead of passing the full ConnParams to display functions.

@NikolayS NikolayS closed this Apr 13, 2026
@NikolayS
NikolayS deleted the claude/add-welcome-message-ETNGh branch April 29, 2026 01:44
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.

3 participants