Skip site navigation (1) Skip section navigation (2)

Re: Trigger on Postgres for tables syncronization

From: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
To: Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger on Postgres for tables syncronization
Date: 2004-07-27 14:40:05
Message-ID: 20040727144005.55961.qmail@web41811.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-general
Dear Csaba...

OK, I did some tests on my postgres around view trying
to understand the view concept.

Yes, you are absolutely correct. View is my problem
solution.
I only have to equip the "rule" of the view and that's
it.

Thank you very much for your kindness....

I really appreciate your generousity.

Thanks.
--- Csaba Nagy <nagy(at)ecircle-ag(dot)com> wrote:
> Prabu,
> 
> Views show you the exact content of the table(s)
> they are built upon,
> filtered by some conditions.
> Just try to create appointment0 and appointment1
> like this:
> 
> CREATE VIEW appointment0 AS SELECT * FROM
> appointment WHERE done = 'Y';
> 
> CREATE VIEW appointment1 AS SELECT * FROM
> appointment WHERE done = 'N';
> 
> Now you can use appointment0 and appointment1 for
> selects exactly as you
> would use any other table, and they will show you
> exactly the data in
> appointment, filtered by the values of the "done"
> column.
> 
> If you still don't understand how all this works,
> then you should take
> an SQL tutorial and read up on views.
> In any case you should read the postgres
> documentation which is quite
> good:
> http://www.postgresql.org/docs/7.4/static/index.html
> 
> 
> HTH,
> Csaba.
> 
> 
> On Tue, 2004-07-27 at 15:35, Prabu Subroto wrote:
> > But I think, the modification of records to the
> table
> > "appointment0" dan "appointment1" must be done
> > automatically if my program modifies the
> > "appointment". That's why I think I should use
> trigger
> > and function.
> > 
> > Please tell me more detail.
> 
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>               
> http://www.postgresql.org/docs/faqs/FAQ.html
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2004-07-27 14:54:57
Subject: Re: open of /usr/lib/pgsql/data/pg_clog/0F3E failed
Previous:From: Mike NolanDate: 2004-07-27 14:31:40
Subject: Before/After trigger sequencing question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group