Re: postgres hit url?

From: Julie Goldberg <julie(at)empowerengine(dot)com>
To: Tony Alderman <tonyalderman(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "seapug(at)postgresql(dot)org" <seapug(at)postgresql(dot)org>
Subject: Re: postgres hit url?
Date: 2014-04-26 00:25:06
Message-ID: 0A8826DF-5E21-4A86-B8F3-5B9C8A89DE4D@empowerengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: seapug

Thanks all.

Tony's github link looks great. We recently migrated to Amazon RDS for our database server, so we can dynamically resize and use their backup procedures. Unfortunately, Amazon doesn't give you shell access to the db server, so we can't install stuff like that.

Joshua's point that I should try pl/perl or pl/python was helpful too. Unfortunately, again, I can't import any of the standard perl libraries used for grabbing a URL. I tried HTTP::Request, NET::LDAP and NET::LDAPS.

Any other ideas? If not, I'm going to see if we can get the folks sending us data to make an API call to our web server after the db dump. If that fails too, I'll have to use a cron job that checks if my data has been updated.

Thanks

Julie

--
Julie Goldberg
Principal
Empower Engine

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

On Apr 25, 2014, at 4:00 PM, Tony Alderman <tonyalderman(at)gmail(dot)com> wrote:

> 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
>>
>>
>>
>>

In response to

Responses

Browse seapug by date

  From Date Subject
Next Message Joshua D. Drake 2014-04-26 00:33:58 Re: postgres hit url?
Previous Message Tony Alderman 2014-04-25 23:00:20 Re: postgres hit url?