pgsql: get_names_for_var didn't do recursion for unnamed JOIN vars quite

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

Log Message:
-----------
get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level. Per example from
Laurie Burrow. Also fix same issue in markTargetListOrigin. I think the
latter is only a latent bug since we currently don't apply markTargetListOrigin
except at the outer level ... but should do it right anyway.

Modified Files:
--------------
pgsql/src/backend/parser:
parse_target.c (r1.128 -> r1.129)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_target.c.diff?r1=1.128&r2=1.129)
pgsql/src/backend/utils/adt:
ruleutils.c (r1.187 -> r1.188)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c.diff?r1=1.187&r2=1.188)

#2The Hermit Hacker
scrappy@hub.org
In reply to: Tom Lane (#1)
Re: pgsql: get_names_for_var didn't do recursion for

With the several backend related changes that have gone in over the past
couple of days, are we looking at an RC6? :(

On Thu, 13 Jan 2005, Tom Lane wrote:

Log Message:
-----------
get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level. Per example from
Laurie Burrow. Also fix same issue in markTargetListOrigin. I think the
latter is only a latent bug since we currently don't apply markTargetListOrigin
except at the outer level ... but should do it right anyway.

Modified Files:
--------------
pgsql/src/backend/parser:
parse_target.c (r1.128 -> r1.129)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_target.c.diff?r1=1.128&r2=1.129)
pgsql/src/backend/utils/adt:
ruleutils.c (r1.187 -> r1.188)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c.diff?r1=1.187&r2=1.188)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: The Hermit Hacker (#2)
Re: pgsql: get_names_for_var didn't do recursion for

"Marc G. Fournier" <scrappy@postgresql.org> writes:

With the several backend related changes that have gone in over the past
couple of days, are we looking at an RC6? :(

Nothing that I've put in seems significant enough to need an RC6. The
only recent patch that really has any risk of destabilization is the one
that caused RC5 (the SMgr hashtable backlink stuff). I'd prefer to see
people go full bore on testing RC5 than spend time updating to a new RC.

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: pgsql: get_names_for_var didn't do recursion for

Tom Lane wrote:

"Marc G. Fournier" <scrappy@postgresql.org> writes:

With the several backend related changes that have gone in over the past
couple of days, are we looking at an RC6? :(

Nothing that I've put in seems significant enough to need an RC6. The
only recent patch that really has any risk of destabilization is the one
that caused RC5 (the SMgr hashtable backlink stuff). I'd prefer to see
people go full bore on testing RC5 than spend time updating to a new RC.

Agreed.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: The Hermit Hacker (#2)
Re: pgsql: get_names_for_var didn't do recursion for

On Thu, 13 Jan 2005, Tom Lane wrote:

Log Message:
-----------
get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level. Per example from
Laurie Burrow. Also fix same issue in markTargetListOrigin. I think the
latter is only a latent bug since we currently don't apply
markTargetListOrigin
except at the outer level ... but should do it right anyway.

BTW, this code is almost verbatim in 7.4. Do you want me to patch it
back?

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
Y dijo Dios: "Que sea Satan�s, para que la gente no me culpe de todo a m�."
"Y que hayan abogados, para que la gente no culpe de todo a Satan�s"

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#5)
Re: pgsql: get_names_for_var didn't do recursion for

Alvaro Herrera <alvherre@dcc.uchile.cl> writes:

get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level. Per example from
Laurie Burrow. Also fix same issue in markTargetListOrigin. I think the
latter is only a latent bug since we currently don't apply
markTargetListOrigin
except at the outer level ... but should do it right anyway.

BTW, this code is almost verbatim in 7.4. Do you want me to patch it
back?

In markTargetListOrigin you mean? I think it's unnecessary, but if
you want to...

regards, tom lane