>
> Jan,
>
> I'm absolutely amazed by this piece of magic.
Written just to check if I understand parsetrees now.
:-)
> A simple VIEW I have goes in as:-
>
> SELECT t.artist, t.song, t.trackno, d.cdname
> FROM disks d, tracks t
> WHERE d.diskid = t.diskid
>
> And comes out as :-
>
> disks=> select get_ruledef('_RETsongs');
> get_ruledef
> --------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> CREATE RULE _RETsongs AS ON SELECT TO songs DO INSTEAD SELECT t.artist, t.song,
> t.trackno, d.cdname FROM disks d, tracks t WHERE d.diskid = t.diskid;
> (1 row)
>
> disks=>
>
> Absolutely perfect rule definition for the VIEW.
>
> One slight bug I found was that ANDs come out as ORs but that's
> easily fixed with the following patch.
cut-n-paste error, tnx.
Another one might be ISNULL (I think I missed it). But as I said,
it's just a point to start from.
>
> What can I say.....
> Thanks,
> Keith.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #