Thread: update field table.....

update field table.....

From
"Muhammad Rusydi"
Date:
Hi all,
i'm student from Indonesian.... :)
nice to meet the group....this is my first email in this forum....and i've a
lot of questions about Postgres....
well, one of my problem now is:
i want to update some of my field on table...
--------------------
sem           period
--------------------
 3          2000/2001
 and i want it will be updated automatically to be.....
--------------------
sem           period
--------------------
 4          2001/2002
if date on the system or server (Postgres) changed on if the month changed
from February to March....and it'll also be update...
--------------------
sem           period
--------------------
 5          2002/2003
if the month change from Agustus to September....
is it possible to do this with Postgres? If there's someone ever had
experienced like this, i will be grateful for your help.
thank's for the help...sorry...my english bad and i hope it'll
understandable.... :)
piece...
Rusydi



Re: update field table.....

From
"Oliver Elphick"
Date:
"Muhammad Rusydi" wrote:

  >i want to update some of my field on table...
  >--------------------
  >sem           period
  >--------------------
  > 3          2000/2001
  > and i want it will be updated automatically to be.....
  >--------------------
  >sem           period
  >--------------------
  > 4          2001/2002
  >if date on the system or server (Postgres) changed on if the month changed
  >from February to March....and it'll also be update...
  >--------------------
  >sem           period
  >--------------------
  > 5          2002/2003
  >if the month change from Agustus to September....

You can't do this in PostgreSQL.  You should use cron to run a script to
do these updates at the appropriate times.



--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "If we confess our sins, he is faithful and just to
      forgive us our sins, and to cleanse us from all
      unrighteousness."          I John 1:9