postgres hit url?

From: Julie Goldberg <julie(at)empowerengine(dot)com>
To: "seapug(at)postgresql(dot)org" <seapug(at)postgresql(dot)org>
Subject: postgres hit url?
Date: 2014-04-25 22:45:45
Message-ID: 62F078D8-16EC-4935-AB5C-6909230155D6@empowerengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: seapug

Hi there,

I haven't made it to a SeaPug meeting in a few months, but I have a postgres challenge, so I'm hoping someone on this list can help me.

How do I write a pl/pgsql function that will have postgres hit an arbitrary url?

I feel like there's got to be a way to do that, but it's very hard to Google for.

My basic problem is this. I have an external db server that is adding data to my db, and whenever that happens, I want to trigger a job in my django app to process it. Redoing the job in sql would be harder to maintain. I could write a cron job that checks every hour if there's new data and processes it, but a trigger is the more appropriate way to handle this and gets the updated data sooner. I found postgres' notifications system, but I would have to set up a specific server that listens to postgres. Ultimately I want a hidden page or api call built into my django app that the db calls out to.

Thanks in advance

Julie
--
Julie Goldberg
Principal
Empower Engine

(206) 632-7647
julie(at)empowerengine(dot)com

Responses

Browse seapug by date

  From Date Subject
Next Message Joshua D. Drake 2014-04-25 22:52:43 Re: postgres hit url?
Previous Message Albin, Lloyd P 2014-03-04 18:27:51 Meeting Canceled