Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jordanlewis
Copy link
Contributor

lib/pq currently has a dedicated set of functionality for subscribing to
LISTEN/NOTIFY messages, but you have to use it on a separate connection.

This commit adds a simple way to register a handler for notifications
that is on an ordinary database connection. This is useful if a user
wants to LISTEN to a channel on the same connection as their ordinary
database connection.

lib/pq currently has a dedicated set of functionality for subscribing to
LISTEN/NOTIFY messages, but you have to use it on a separate connection.

This commit adds a simple way to register a handler for notifications
that is on an ordinary database connection. This is useful if a user
wants to LISTEN to a channel on the same connection as their ordinary
database connection.
@jordanlewis
Copy link
Contributor Author

@mjibson PTAL. This is for adding messages to cockroach sql when a connection receives a LISTEN/NOTIFY message. See cockroachdb/cockroach#48308.

@madelynnblue madelynnblue merged commit 6a6cbca into lib:master May 3, 2020
@jordanlewis jordanlewis deleted the notifications branch May 3, 2020 16:13
@jordanlewis
Copy link
Contributor Author

Thanks!

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.

2 participants