Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007

    Unanswered: detect any update in remote postgresql table


    I'm new to develop postgresql application with VB6 under windows.
    My VB application is connecting to the remote PostgreSQL.

    I want to let my VB application catch any changes of a specific table
    in the remote PostgreSQL DB as a VB event.

    Is it possible? If so or any equivalent effect, please let me know how to do it.

    Thanks in advance

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    AFAIK, there's nothing standard in postgresql to support this directly.

    You could add a trigger in the to update a timestamp in a separate "flag" table when changes are made.

    Is the remote server running on Windows or Linux? If it's Windows, and you have install priviledges, you could write/install a little monitor app that polls the table periodically (every second or two) to check this "flag" table. If the flag is set, signal your client app using winsock.

    Note. You might also consider this: If you set up a distinct, separate tablespace for your target table (and ONLY the table) then changes to the table will result in the tablespace data file timestamp being updated... You might be able to monitor a file remotely...
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts