vercel / vercel/storage

@vercel/postgres Document the use of LISTEN and NOTIFY (if at all possible).

Open
#524 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
595
Forks
101
Avg merge
2h 24m
Merged PRs (30d)
1

Description

The documentation states full compatibility with postgres, does this include LISTEN/NOTIFY?

The Neon docs mention LISTEN/NOTIFY and it works from psql so I would assume we can use them, but I see no clear way to call these commands from the SDK.

import { sql } from "@vercel/postgres"

const res = await sql`LISTEN foo`
console.log(res)
// This immediately returns
// {
//   command: "LISTEN",
//   fields: [],
//   rowAsArray: false,
//   rowCount: null,
//   rows: [],
//   viaNeonFetch: true
// }

Is this feature supported, and if so, what are the limitations.

If not, can we clarify that in the docs?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the @vercel/postgres sql entry point shown in the issue and verify whether LISTEN and NOTIFY are supported through the SDK, including the behavior shown in the example. Check the Neon compatibility reference linked in the issue, then document the supported usage and limitations, or clarify that the commands are unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, typescript
Domain
databases, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.