From: | jwieck(at)debis(dot)com (Jan Wieck) |
---|---|
To: | emkxp01(at)mtcc(dot)demon(dot)co(dot)uk |
Cc: | jwieck(at)debis(dot)com, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] dumping rules |
Date: | 1998-08-18 20:18:51 |
Message-ID: | m0z8sDU-000EBPC@orion.SAPserv.Hamburg.dsh.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> 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(at)debis(dot)com (Jan Wieck) #
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-08-18 21:26:53 | Re: [HACKERS] int8 type -- call for porting results! |
Previous Message | Keith Parks | 1998-08-18 20:07:17 | Re: [HACKERS] dumping rules |