From: | "Arthur Hoogervorst" <arthur(dot)hoogervorst(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgresql to Delphi |
Date: | 2007-03-20 22:40:24 |
Message-ID: | ff60f9b30703201540r4d0e73bfke8bc8427729384af@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi:
There are a couple of solutions to solve this problem and some of them
will depend on how frequent you expect these changes to happen.
I generally stay clear from server-specific notifications: In the
larger projects I have seen and maintained, we used background
processes to do this kind of stuff: shell scripts calling external
applications on regular intervals. For smaller projects, I would just
do this (in a timely fashion) internally in my 'user'/client
application.
As for Delphi: Tony is too much of a fan of this particular language
:-) [no offense meant, since I've been working for years in Delphi
too]
Regards,
Arthur
On 3/20/07, Bob Pawley <rjpawley(at)shaw(dot)ca> wrote:
> I think that may be what I have been trying to do.
>
> Can you point me to some literature on how to do that? I'm just learning the
> basics of Delphi and the documenation I've seen so far hasn't been very
> specific.
>
> Bob
>
>
> ----- Original Message -----
> From: "Tony Caduto" <tony_caduto(at)amsoftwaredesign(dot)com>
> To: "Bob Pawley" <rjpawley(at)shaw(dot)ca>
> Cc: <pgsql-general(at)postgresql(dot)org>
> Sent: Tuesday, March 20, 2007 3:07 PM
> Subject: Re: [GENERAL] Postgresql to Delphi
>
>
> > Bob Pawley wrote:
> >> Listen/notify implies a dynamic table that is constantly on the change.
> >> Am I correct?
> >>
> >> The table I am talking about is completed through one interface then
> >> imported as a relatively static information base for the application in
> >> which I am seeking help.
> >>
> > Yes,
> > you would have to define a rule on the table and when the table changed it
> > would send a notification back to who ever is listening.
> >
> > Why don't you just run a query against the table, then loop through the
> > result set and then trigger your devices from inside the loop?
> >
> > myquery.sql.add('select * from mytable where bla = bla;');
> > myquery.open;
> > While not myquery.eof do
> > begin
> > if myquery.fieldbyname('somefield').asstring = 'something' then
> > //signal your device.
> > myquery.next;
> > end;
> >
> > I guess that is the best I can come up without knowing more.
> >
> > Later,
> >
> > --
> > Tony Caduto
> > AM Software Design
> > http://www.amsoftwaredesign.com
> > Home of PG Lightning Admin for Postgresql
> > Your best bet for Postgresql Administration
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-03-20 22:57:53 | Re: Bug in CREATE/DROP TABLESPACE command |
Previous Message | Angva | 2007-03-20 22:33:22 | Re: sql indexing suggestions needed |