pgsql/src/backend/commands (view.c)

Started by Tom Laneover 25 years ago4 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Date: Thursday, December 21, 2000 @ 12:36:15
Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
from hub.org:/home/projects/pgsql/tmp/cvs-serv64711

Modified Files:
view.c

----------------------------- Log Message -----------------------------

Fix longstanding bug with VIEW using BETWEEN: OffsetVarNodes would get
applied to the duplicated subtree twice. Probably someday we should
fix the parser not to generate multiple links to the same subtree,
but for now a quick copyObject() is the path of least resistance.

#2Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#1)
Re: pgsql/src/backend/commands (view.c)

I think that was me, long ago.

Date: Thursday, December 21, 2000 @ 12:36:15
Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
from hub.org:/home/projects/pgsql/tmp/cvs-serv64711

Modified Files:
view.c

----------------------------- Log Message -----------------------------

Fix longstanding bug with VIEW using BETWEEN: OffsetVarNodes would get
applied to the duplicated subtree twice. Probably someday we should
fix the parser not to generate multiple links to the same subtree,
but for now a quick copyObject() is the path of least resistance.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: pgsql/src/backend/commands (view.c)

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I think that was me, long ago.

IIRC, BETWEEN is not the only construct that generates multiply-linked
subtrees, so you don't need to take the whole blame ;-)

The copyObject solution has the advantage of being fairly robust,
whereas trying to ban such things in the parser's output would not be.

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: pgsql/src/backend/commands (view.c)

OK, I will remove the new TODO item.

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I think that was me, long ago.

IIRC, BETWEEN is not the only construct that generates multiply-linked
subtrees, so you don't need to take the whole blame ;-)

The copyObject solution has the advantage of being fairly robust,
whereas trying to ban such things in the parser's output would not be.

regards, tom lane

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026