Recieving notification when a table changes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anitajose
    New Member
    • Aug 2006
    • 11

    Recieving notification when a table changes

    Hi,
    Is there any way to know when a change in table occurs for a postgresql table to the front end , VC++ ?

    Please reply me soon.

    Anita
  • anitajose
    New Member
    • Aug 2006
    • 11

    #2
    Originally posted by anitajose
    Hi,
    Is there any way to know when a change in table occurs for a postgresql table to the front end , VC++ ?

    Please reply me soon.

    Anita
    Please reply meeeee

    Comment

    • somaskarthic
      New Member
      • Aug 2006
      • 60

      #3
      Hi

      I'm not sure whether there exist some inbuilt methods for lastmodificatio n datetime for a table .
      But you can achieve this using triggers.
      Let your table name be 'table1' and have one more table 'table_lastupda te_time'. If you insert,delete, or update any data in 'table1' ,
      your trigger function should store the details in 'table_lastupda te_time'

      Let the new table ('table_lastupd ate_time') contain two fields,
      1.tablename
      2.last_action (timestamp).

      The trigger function (on insert , delete or update )should update current_timesta mp to the last_action field.

      So, in your vc++ application you can retrieve the last_action time from ''table_lastupd ate_time' table.

      -somaskarthic




      Originally posted by anitajose
      Hi,
      Is there any way to know when a change in table occurs for a postgresql table to the front end , VC++ ?

      Please reply me soon.

      Anita

      Comment

      Working...