pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6692: Potential Bug in equalfuncs.c
2+ messages / 2 participants
[nested] [flat]
* BUG #6692: Potential Bug in equalfuncs.c
@ 2012-06-13 18:03 msrbugzilla@gmail.com
2012-06-16 16:31 ` Re: BUG #6692: Potential Bug in equalfuncs.c Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: msrbugzilla@gmail.com @ 2012-06-13 18:03 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 6692
Logged by: Ken Cheung
Email address: msrbugzilla@gmail.com
PostgreSQL version: 9.1.3
Operating system: Linux
Description:
I observed a code clone in the following files. The function
"COMPARE_LOCATION_FIELD" is called in some functions and missed in other
functions. I wonder if this is a bug. Hope it helps.
function : _equalA_ArrayExpr @ (file:
"postgresql-9.1.3/src/backend/nodes/equalfuncs.c", line: 2118)~2121
COMPARE_NODE_FIELD(elements);
COMPARE_LOCATION_FIELD(location);
return true;
function : _equalAlternativeSubPlan @ (file:
"postgresql-9.1.3/src/backend/nodes/equalfuncs.c", line: 415)~417
COMPARE_NODE_FIELD(subplans);
return true;
function : _equalColumnRef @ (file:
"postgresql-9.1.3/src/backend/nodes/equalfuncs.c", line: 2051)~2054
COMPARE_NODE_FIELD(fields);
COMPARE_LOCATION_FIELD(location);
return true;
function : _equalDoStmt @ (file:
"postgresql-9.1.3/src/backend/nodes/equalfuncs.c", line: 1306)~1308
COMPARE_NODE_FIELD(args);
return true;
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #6692: Potential Bug in equalfuncs.c
2012-06-13 18:03 BUG #6692: Potential Bug in equalfuncs.c msrbugzilla@gmail.com
@ 2012-06-16 16:31 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2012-06-16 16:31 UTC (permalink / raw)
To: msrbugzilla@gmail.com; +Cc: pgsql-bugs
msrbugzilla@gmail.com writes:
> I observed a code clone in the following files. The function
> "COMPARE_LOCATION_FIELD" is called in some functions and missed in other
> functions. I wonder if this is a bug. Hope it helps.
Well, COMPARE_LOCATION_FIELD() is a no-op anyway, but for
documentation's sake it should be called in the comparison function for
every node type that has a token location field (some do, some don't).
So far as I can see, it is called where it should be. Did you observe a
place where it is not, and if so where?
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-06-16 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 18:03 BUG #6692: Potential Bug in equalfuncs.c msrbugzilla@gmail.com
2012-06-16 16:31 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox