Thread: Small fix for _copyGrantStmt

Small fix for _copyGrantStmt

From
Fernando Nasser
Date:
The 'privileges' field is a list of integers, not nodes.


--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9Index: src/backend/nodes/copyfuncs.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v
retrieving revision 1.166
diff -c -p -r1.166 copyfuncs.c
*** src/backend/nodes/copyfuncs.c    2002/03/06 20:34:47    1.166
--- src/backend/nodes/copyfuncs.c    2002/03/07 11:58:48
*************** _copyGrantStmt(GrantStmt *from)
*** 1898,1904 ****
      newnode->is_grant = from->is_grant;
      newnode->objtype = from->objtype;
      Node_Copy(from, newnode, objects);
!     Node_Copy(from, newnode, privileges);
      Node_Copy(from, newnode, grantees);

      return newnode;
--- 1898,1904 ----
      newnode->is_grant = from->is_grant;
      newnode->objtype = from->objtype;
      Node_Copy(from, newnode, objects);
!     newnode->privileges = listCopy(from->privileges);
      Node_Copy(from, newnode, grantees);

      return newnode;

Re: Small fix for _copyGrantStmt

From
Tom Lane
Date:
Fernando Nasser <fnasser@redhat.com> writes:
> The 'privileges' field is a list of integers, not nodes.

Done, also fixed the corresponding mistake in equalfuncs.c.

            regards, tom lane