Is "Window" really safe as a global typedef name?
I'm looking at the window-functions patch and wondering just what kind
of trouble we'll get into if we leave its new plan node type named just
"Window". I've already confirmed that this is a direct conflict against
a typedef in <X11/X.h>, and I'd be not the least bit surprised if it's
used in even-more-popular system headers on Windows or Darwin. Now
maybe you could always get away with not including such headers together
with plannodes.h, but it sure looks like problems waiting to happen.
So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?
regards, tom lane
On Fri, Dec 19, 2008 at 10:36:30PM -0500, Tom Lane wrote:
I'm looking at the window-functions patch and wondering just what
kind of trouble we'll get into if we leave its new plan node type
named just "Window". I've already confirmed that this is a direct
conflict against a typedef in <X11/X.h>, and I'd be not the least
bit surprised if it's used in even-more-popular system headers on
Windows or Darwin. Now maybe you could always get away with not
including such headers together with plannodes.h, but it sure looks
like problems waiting to happen.So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?
QueryWindow? ResultSetWindow?
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
Tom Lane wrote:
I'm looking at the window-functions patch and wondering just what kind
of trouble we'll get into if we leave its new plan node type named just
"Window". I've already confirmed that this is a direct conflict against
a typedef in <X11/X.h>, and I'd be not the least bit surprised if it's
used in even-more-popular system headers on Windows or Darwin. Now
maybe you could always get away with not including such headers together
with plannodes.h, but it sure looks like problems waiting to happen.So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?
EvalWindow sounds like a function in src/backend/executor/.
WindowAgg?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
OLAPWindow? Gives a clue what meaning of "window" it's referring to...
--
Greg
On 20 Dec 2008, at 03:13, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com
Show quoted text
wrote:
Tom Lane wrote:
I'm looking at the window-functions patch and wondering just what
kind
of trouble we'll get into if we leave its new plan node type named
just
"Window". I've already confirmed that this is a direct conflict
against
a typedef in <X11/X.h>, and I'd be not the least bit surprised if
it's
used in even-more-popular system headers on Windows or Darwin. Now
maybe you could always get away with not including such headers
together
with plannodes.h, but it sure looks like problems waiting to happen.
So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?EvalWindow sounds like a function in src/backend/executor/.
WindowAgg?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
Tom Lane wrote:
So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?
EvalWindow sounds like a function in src/backend/executor/.
WindowAgg?
WindowAgg seems like a winner to me, because it draws a parallel to
the regular Agg node type, which seems valid unless I've completely
misunderstood what's happening...
regards, tom lane
2008/12/21 Tom Lane <tgl@sss.pgh.pa.us>:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
Tom Lane wrote:
So I'm thinking we'd better rename it, but I'm not coming up with
anything good; the best I can do after a long day is "EvalWindow",
and that doesn't seem particularly inspired. Any suggestions?EvalWindow sounds like a function in src/backend/executor/.
WindowAgg?
WindowAgg seems like a winner to me, because it draws a parallel to
the regular Agg node type, which seems valid unless I've completely
misunderstood what's happening...
I disagree with WindowAgg. The aggregates are subset of window
functions in the node, though much code is similar and ported from
nodeAgg.
The spec introduces its concept as "Windowed Table". So I'd suggest
"WindowedTable" or "WindowTable". Or "Windowed" if shortened.
Regards,
--
Hitoshi Harada
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
2008/12/21 Tom Lane <tgl@sss.pgh.pa.us>:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
WindowAgg?
WindowAgg seems like a winner to me, because it draws a parallel to
the regular Agg node type, which seems valid unless I've completely
misunderstood what's happening...
I disagree with WindowAgg. The aggregates are subset of window
functions in the node, though much code is similar and ported from
nodeAgg.
So? If Agg does a subset of what WindowAgg does, all the more reason
to use that name.
The spec introduces its concept as "Windowed Table". So I'd suggest
"WindowedTable" or "WindowTable". Or "Windowed" if shortened.
I don't care for this proposal. Most of the plan node types are named
after verbs denoting their actions ("scan", "sort", etc --- note that
"aggregate" can be a verb in English, and I think the verb sense is what
the Agg(regate) node is named for). Choosing a name that's a noun
doesn't fit in.
regards, tom lane
2008/12/22 Tom Lane <tgl@sss.pgh.pa.us>:
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
2008/12/21 Tom Lane <tgl@sss.pgh.pa.us>:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
WindowAgg?
WindowAgg seems like a winner to me, because it draws a parallel to
the regular Agg node type, which seems valid unless I've completely
misunderstood what's happening...I disagree with WindowAgg. The aggregates are subset of window
functions in the node, though much code is similar and ported from
nodeAgg.So? If Agg does a subset of what WindowAgg does, all the more reason
to use that name.
OK. I thought WindowAgg means some kind of subset of Agg, but if it
means Window (And) Agg then it makes sense to me.
Regards,
--
Hitoshi Harada