Re: [HACKERS] dumping rules
От | jwieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [HACKERS] dumping rules |
Дата | |
Msg-id | m0z8sDU-000EBPC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] dumping rules (Keith Parks <emkxp01@mtcc.demon.co.uk>) |
Список | 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@debis.com (Jan Wieck) #
В списке pgsql-hackers по дате отправления: