pgsql-http | HTTP client for PostgreSQL , retrieve a web page | REST library
kandi X-RAY | pgsql-http Summary
kandi X-RAY | pgsql-http Summary
HTTP client for PostgreSQL, retrieve a web page from inside the database.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pgsql-http
pgsql-http Key Features
pgsql-http Examples and Code Snippets
Community Discussions
Trending Discussions on pgsql-http
QUESTION
My Django app connects to a PostgreSQL 9.x database. To this database, a legacy Java app is connected, too. So two different apps use the same database.
Is it possible for PostgreSQL to notify my Django (2.2.x) app when a table changes? I know that I can create a cron job to check on tables on a timely basis, but the Server administrator does not let me do cron jobs (why?) and the Java guy is too busy on other things to do code rewiring (so I can't ask him him to send me url requests after table changes).
Or any other idea would be much appreciated. Thanks.
EDIT: After some google-search I found this tool: pgsql-http but the database admin won't install it.
...ANSWER
Answered 2020-Feb-19 at 23:45You can use triggers to NOTIFY when INSERTs, UPDATEs, or DELETEs occur. But something needs to LISTEN to the notices, on a persistent connection. I don't know how easy it is arrange for that to happen under Django.
I know that I can create a cron job to check on tables on a timely basis, but the Server administrator does not let me do cron jobs
You can run cron
on any other box on the network you have access to, and have it use curl or wget to hit an endpoint on Django on production, which then does whatever it is you want done.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pgsql-http
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page