>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:

 Tom> Well, sure, but I was only suggesting adding it when the
 Tom> aggregate asks for it, probably via a new flag column in
 Tom> pg_aggregate.

Sure, I was only pointing out the necessity.

 Tom> The question you're evading is what additional functionality
 Tom> could be had if the aggregate could demand a different datatype
 Tom> or constant value for the flag column.

I don't really see a question there to answer - I simply chose to
provide a general mechanism rather than make assumptions about what
future users of the code would desire. I have no specific application
in mind that would require some other type.

 >> Adding it only for hypothetical set functions is making a
 >> distinction in how functions are executed that I don't think is
 >> warranted -

 Tom> That seems like rather a curious argument from someone who's
 Tom> willing to give up the ability to specify a regular transition
 Tom> value concurrently with the flag column.

In the current patch the idea of also specifying a regular transition
value is meaningless since there is no transition function.

 Tom> But anyway, what I'm thinking right now is that these questions
 Tom> would all go away if the aggregate transfunction were receiving
 Tom> the rows and sticking them into the tuplestore.  It could add
 Tom> whatever columns it felt like.

True, but this ends up duplicating the sorting functionality of
nodeAgg that we are leveraging off in the first place. I think this
will be somewhat more intrusive and likely slower.

-- 
Andrew (irc:RhodiumToad)


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to