Skip to content

Add LISTEN/NOTIFY support#108

Merged
SeanTAllen merged 2 commits intomainfrom
listen-notify
Feb 12, 2026
Merged

Add LISTEN/NOTIFY support#108
SeanTAllen merged 2 commits intomainfrom
listen-notify

Conversation

@SeanTAllen
Copy link
Member

Parse NotificationResponse messages and deliver them via a new pg_notification callback on SessionStatusNotify. Previously these messages were silently ignored.

New public API:

  • Notification val class with channel, payload, and pid fields
  • pg_notification(session, notification) behavior on SessionStatusNotify with default no-op body (non-breaking)

The parser uses the isolated-payload pattern (buffer.block + separate Reader) matching all other variable-length message parsers, per the review finding posted on the design discussion.

Design: #103

Parse NotificationResponse messages and deliver them to users via a new
pg_notification callback on SessionStatusNotify. Previously these messages
were returned as _SkippedMessage and silently ignored.

The parser uses the isolated-payload pattern (buffer.block + separate
Reader) matching the approach used by all other variable-length message
parsers in the codebase, rather than reading directly from the shared
buffer as originally proposed in the design.

New public API: Notification val class (channel, payload, pid) and
pg_notification behavior with default no-op body (non-breaking).

Design: #103
@SeanTAllen SeanTAllen added the changelog - added Automatically add "Added" CHANGELOG entry on merge label Feb 12, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 12, 2026
Integration test belongs with other notification tests for cohesion.
Remove LISTEN/NOTIFY from unsupported features list in README.
@SeanTAllen SeanTAllen merged commit 6c5fef9 into main Feb 12, 2026
8 checks passed
@SeanTAllen SeanTAllen deleted the listen-notify branch February 12, 2026 20:31
github-actions bot pushed a commit that referenced this pull request Feb 12, 2026
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 12, 2026
github-actions bot pushed a commit that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - added Automatically add "Added" CHANGELOG entry on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants