could not create pg-notify extension in pgadmin

139 Views Asked by At

CREATE EXTENSION IF NOT EXISTS pg_notify; could not execute this command in pgadmin .

I am getting the following error: ERROR: could not open extension control file "C:/Program Files/PostgreSQL/14/share/extension/pg_notify.control": No such file or directory

1

There are 1 best solutions below

0
Hassoo On

I am not sure what you're trying to do. pg_notify is not an extension, it is instead a function, according to this documentation. The signature of the function is pg_notify(text, text). The function takes the channel name as the first argument and the payload as the second.

Alternatively, you can send a notification as:

NOTIFY my_channel, 'Hello, world!';

and listen to it as follows:

LISTEN my_channel;