From: | Thiemo Kellner <thiemo(at)thiam(dot)ch> |
---|---|
To: | pgNovice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Why should my rule be conditional? |
Date: | 2003-12-26 22:19:49 |
Message-ID: | 200312262320.26603.thiemo@thiam.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It's not trying to insert a row of nulls; it's simply not inserting any
> row at all. The transformed rule query looks like
> INSERT INTO t_songs SELECT ... FROM v_songs WHERE ...
> and the WHERE condition is such that no rows will be selected.
Ok, I thought NEW and OLD would be some kind of variables. As the code in the
rule gets rewritten as an other sql statement, I can see that I was
completely misslead. It might be a point to include in the documentation if
it's not already there and I just didn't read carefully enough.
> > Would it be a great loss to depracate rules?
>
> The fact they don't do what you want doesn't make them worthless ...
I know. That's not what I meant. I tried to say that if triggers can do
everything rules can but just more, there might not be much reason to keep
rules and confusion. However, the doument of your link below quite clearly
states the differences, quite what I needed and was not able to find in the
documentation (of 7.3 but it is there too). Looking at the chapter it is
supposed to be in some chapter 13.7. However, looking in the index (7.3
interactive) there is only one chapter 13 and that's regression test without
a subchapter 7. Do you know how I can navigate to the document in case I
sould need it some month in the future? I hope I don't bother you too much
going on about documentation. Is there somebody who could explain the
documentation system used at docs.postgresql.org?
> There is some discussion of rules vs triggers in the docs:
> http://www.postgresql.org/docs/7.4/static/rules-triggers.html
Many thanks for your patience
Thiemo
- --
root ist die Wurzel allen Übels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/7LQmood55Uv4ElYRAmzfAKCVZeSI7+58mhGeCT5enI/DOhKEQwCeJE/q
jMDd4HLU/fk5q130Sq1GbEI=
=jytX
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-26 23:09:46 | Re: Why should my rule be conditional? |
Previous Message | Tom Lane | 2003-12-26 21:15:42 | Re: Why should my rule be conditional? |