pg_user problem - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject pg_user problem
Date
Msg-id 199809111402.XAA05862@srapc451.sra.co.jp
Whole thread Raw
Responses pgrewrite: was Re: [HACKERS] pg_user problem
List pgsql-hackers
Hi, please apply following patches to rewrite/rewriteManip.c.
This seems to fix the "pg_user problem." (I am not very familiar
with the rule/rewrite area, so my understanding may be wrong)
The original code sets varlevelsup even if the node is not
variable node. This assumption is not always correct, for example
with the password column of pg_user view.
Anyway, with the patch the select_view test is now ok on my LiuxPPC
box.

*** rewriteManip.c.orig    Fri Sep 11 21:24:04 1998
--- rewriteManip.c    Fri Sep 11 22:18:33 1998
***************
*** 633,639 ****
                              *nodePtr = copyObject(n);
                          else
                              *nodePtr = n;
!                         ((Var *) *nodePtr)->varlevelsup = this_varlevelsup;
                      }
                      *modified = TRUE;
                  }
--- 633,640 ----
                              *nodePtr = copyObject(n);
                          else
                              *nodePtr = n;
!                         if (nodeTag(*nodePtr) == T_Var)
!                                 ((Var *) *nodePtr)->varlevelsup = this_varlevelsup;
                      }
                      *modified = TRUE;
                  }

--
Tatsuo Ishii
t-ishii@sra.co.jp


pgsql-hackers by date:

Previous
From: Andreas Zeugswetter
Date:
Subject: AW: [HACKERS] Names that suddenly include an OID
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] more on int8