Dear my friends...
I am using SuSE Linux 9.1 and postgres. I am a
beginner in postgres, usually I use MySQL.
I have 3 tables : appointment, appointment0 and
appointment1.
the fields of table "appointmen t" are as follows:
noapp* (int4):ID Number of appointment (PK)
custid (int4) : Customer ID
salesid (int4) : Sales ID
date (date) : Date of appointment
time (time) : Time of appointment
todo (char(150)) : What's to do with them
done (char(1)): whether done (N/Y)
warned (char(1)): whether warned with prompt
timestamp (timestamp) : timestamp of record
"appointmen t0" and "appointmen t1" have exactly the
same field names as what "appointmen t" has.
But...
1. the population of "appointmen t0" and "appointmen t1"
are the subset of "appointmen t"
2. what the "appointmen t0" has are the members of
"appointmen t" whose "Y" as the value of fieldname
"done".
3. and what "appointmne t1" has are the members of
"appointmen t" whose "N" as the value of fieldname
"done".
I want if my program inserted, updated, deleted the
record of "appointmen t" than the postgres does the
syncronization to the corresponded tables
(appointment0 or appointment1 or both).
Is it possible to implement this strategy with
trigger? But how?
Where Can I find a good documentation about the
trigger of postgres especially the PLPGSQL of the
postgres?
Anybody would be so nice to tell me the steps and the
command of the triggers should be in order to
implement my strategy? Please....
Please....
Thank you very much in advance.
_______________ _______________ ____
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
I am using SuSE Linux 9.1 and postgres. I am a
beginner in postgres, usually I use MySQL.
I have 3 tables : appointment, appointment0 and
appointment1.
the fields of table "appointmen t" are as follows:
noapp* (int4):ID Number of appointment (PK)
custid (int4) : Customer ID
salesid (int4) : Sales ID
date (date) : Date of appointment
time (time) : Time of appointment
todo (char(150)) : What's to do with them
done (char(1)): whether done (N/Y)
warned (char(1)): whether warned with prompt
timestamp (timestamp) : timestamp of record
"appointmen t0" and "appointmen t1" have exactly the
same field names as what "appointmen t" has.
But...
1. the population of "appointmen t0" and "appointmen t1"
are the subset of "appointmen t"
2. what the "appointmen t0" has are the members of
"appointmen t" whose "Y" as the value of fieldname
"done".
3. and what "appointmne t1" has are the members of
"appointmen t" whose "N" as the value of fieldname
"done".
I want if my program inserted, updated, deleted the
record of "appointmen t" than the postgres does the
syncronization to the corresponded tables
(appointment0 or appointment1 or both).
Is it possible to implement this strategy with
trigger? But how?
Where Can I find a good documentation about the
trigger of postgres especially the PLPGSQL of the
postgres?
Anybody would be so nice to tell me the steps and the
command of the triggers should be in order to
implement my strategy? Please....
Please....
Thank you very much in advance.
_______________ _______________ ____
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Comment