From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ntile() throws ERROR when hashagg is false |
Date: | 2018-06-15 02:50:08 |
Message-ID: | 87602ksrpu.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> I wonder if it would be worth adding a run-time check in
>> window_ntile() that causes an ERROR on first call if there are any
>> Vars or PARAM_EXEC Params in the function argument. An ERROR might
>> be better than doing something that the user does not expect.
Tom> -1, that would break cases that are legal and useful, such as
Tom> where a PARAM_EXEC Param represents an outer-query-level variable,
Tom> while still failing to catch some problematic cases (eg. volatile
Tom> functions).
The only sane run-time check (that I can think of) that could be applied
would be to check that the value is the same on each row of a partition.
Tom> I think also that there are cases that are not legal per spec but
Tom> can still be useful, as long as the user knows what they're doing.
Yes, it would make sense for example to allow the value to change
between partitions.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2018-06-15 03:59:04 | Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression" |
Previous Message | Tom Lane | 2018-06-15 02:38:14 | Re: Partitioning with temp tables is broken |