From: | Tony Alderman <tonyalderman(at)gmail(dot)com> |
---|---|
To: | Julie Goldberg <julie(at)empowerengine(dot)com> |
Cc: | "seapug(at)postgresql(dot)org" <seapug(at)postgresql(dot)org> |
Subject: | Re: postgres hit url? |
Date: | 2014-04-25 23:00:20 |
Message-ID: | 269F675D-B049-4861-8144-8B1AFFD9D6E2@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | seapug |
Here is an extension that someone wrote to do exactly that, but I've never used it and can't vouch for it...
https://github.com/pramsey/pgsql-http
> On Apr 25, 2014, at 3:45 PM, Julie Goldberg <julie(at)empowerengine(dot)com> wrote:
>
> 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
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Julie Goldberg | 2014-04-26 00:25:06 | Re: postgres hit url? |
Previous Message | Joshua D. Drake | 2014-04-25 22:52:43 | Re: postgres hit url? |