Skip to content

Commit

Permalink
fix: Quotes LISTEN queries
Browse files Browse the repository at this point in the history
  • Loading branch information
NeedleInAJayStack committed Mar 18, 2024
1 parent 0b48f79 commit b93882e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/PostgresNIO/New/PostgresChannelHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
private func makeStartListeningQuery(channel: String, context: ChannelHandlerContext) -> PSQLTask {
let promise = context.eventLoop.makePromise(of: PSQLRowStream.self)
let query = ExtendedQueryContext(
query: PostgresQuery(unsafeSQL: "LISTEN \(channel);"),
query: PostgresQuery(unsafeSQL: "LISTEN \"\(channel)\";"),
logger: self.logger,
promise: promise
)
Expand Down Expand Up @@ -642,7 +642,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
private func makeUnlistenQuery(channel: String, context: ChannelHandlerContext) -> PSQLTask {
let promise = context.eventLoop.makePromise(of: PSQLRowStream.self)
let query = ExtendedQueryContext(
query: PostgresQuery(unsafeSQL: "UNLISTEN \(channel);"),
query: PostgresQuery(unsafeSQL: "UNLISTEN \"\(channel)\";"),
logger: self.logger,
promise: promise
)
Expand Down

0 comments on commit b93882e

Please sign in to comment.