Re: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)

From: jwieck(at)debis(dot)com (Jan Wieck)
To: emkxp01(at)mtcc(dot)demon(dot)co(dot)uk
Cc: wieck(at)debis(dot)com, hackers(at)postgreSQL(dot)org, oleg(at)sai(dot)msu(dot)su
Subject: Re: [HACKERS] 6.5 cvs: views doesn't survives after pg_dump (fwd)
Date: 1999-05-25 08:14:22
Message-ID: m10mCLu-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Jan,
>
> Have you any ideas on this?

Yepp

>
> We get a rule output by pg_dump like :-
>
> CREATE RULE "_RETsongs" AS
> ON SELECT TO "songs"
> WHERE DO INSTEAD
> SELECT "t"."artist", "t"."song", "t"."trackno", "d"."cdname"
> FROM "disks" "d", "tracks" "t"
> WHERE "d"."diskid" = "t"."diskid";
>
> from a view defined like so:-
>
> CREATE VIEW songs AS
> SELECT t.artist, t.song, t.trackno, d.cdname
> FROM disks d, tracks t
> WHERE d.diskid = t.diskid;
>
> Note the WHERE keyword in line 3 of the rule define.
>
> >From "./src/backend/utils/adt/ruleutils.c" line 662 of 1814
>
> /* If the rule has an event qualification, add it */
> if (ev_qual == NULL)
> ev_qual = "";
> if (strlen(ev_qual) > 0)
> {
> Node *qual;
> Query *query;
> QryHier qh;
> .
> .

That's exactly the location AFAICS. The problem was
introduced when the storage of rules changed in that the
event qualification is now stored as "<>" (the output of the
node print functions for NULL) instead of a NULL attribute.

I'll fix it soon - thanks.

>
> We put the WHERE in if strlen(ev_qual) > 0
>
> I've not yet followed this back any further.
>
> 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) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-05-25 09:08:13 Re: [HACKERS] Partial fix for INSERT...SELECT problems
Previous Message Jan Wieck 1999-05-25 07:44:14 Re: [HACKERS] createlang - ?