PG rules! 
Author Message
 PG rules!

See my book chapter at:

        http://www.***.com/

It discusses when to use each.  Basically triggers are for modifying the
row you just inserted/updated, while Rules are for referring to other
tables.

Quote:


> > I just want to say, that PG is an awesome thing.  I'm finding new uses
> > for constraints of various kinds to ensure data integrity in my DB.
> > Constraints will really make the whole application more solid, because
> > programming errors elsewhere still won't allow corrupt data to get
> > into the DB.

> And I thought it was a question about rules :-) Speaking of which can
> someone tell me in which circumstances to use rules and in what
> circumstances to use triggers?

> Nils
> --
> Alles van waarde is weerloos
> Lucebert

> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate

> message can get through to the mailing list cleanly

--
  Bruce Momjian                        |   http://www.***.com/

  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.***.com/



Sat, 10 Jan 2004 05:34:41 GMT
 PG rules!

Also, triggers are for when you want to be able to raise meaningful errors, right?  I tend to use triggers a lot for things I could use rules for, just to catch problems and return error messages that help figure out what happened.  I thought you could not do that with a rule.

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549

See my book chapter at:

        http://www.postgresql.org/docs/awbook.html

It discusses when to use each.  Basically triggers are for modifying the
row you just inserted/updated, while Rules are for referring to other
tables.

Quote:


> > I just want to say, that PG is an awesome thing.  I'm finding new uses
> > for constraints of various kinds to ensure data integrity in my DB.
> > Constraints will really make the whole application more solid, because
> > programming errors elsewhere still won't allow corrupt data to get
> > into the DB.

> And I thought it was a question about rules :-) Speaking of which can
> someone tell me in which circumstances to use rules and in what
> circumstances to use triggers?

> Nils
> --
> Alles van waarde is weerloos
> Lucebert

> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate

> message can get through to the mailing list cleanly

--
  Bruce Momjian                        |  http://candle.pha.pa.us

  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Sat, 10 Jan 2004 07:19:02 GMT
 PG rules!

Quote:

> And I thought it was a question about rules :-) Speaking of which can
> someone tell me in which circumstances to use rules and in what
> circumstances to use triggers?

check here:

http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/rules-tri...

    regards    laser

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sat, 10 Jan 2004 20:11:28 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. PG rules!

2. PG rules! (RULES being the word ;->)

3. [Fwd: Re: PG rules! (RULES being the word ;->)]

4. PG rules! (RULES being the word ;->)

5. Building perl mods pg:PG or DBD:PG on non

6. Building perl mods pg:PG or DBD:PG on non-PostgreSQLable machines

7. pgsql/src/interfaces/perl5 Pg.pm Pg.xs

8. pg_dump: PG 7.0 -> PG 7.2.1

9. Installing DBD::Pg module without Pg Database server

10. Multiple PG Installations with DBD::Pg?

11. DBD::Pg vs Pg.pm


 
Powered by phpBB® Forum Software