Last modified: 2014-10-06 13:41:52 UTC
Created attachment 5821 [details] Patch against r47324 It would be nice to be able to query the editcount and/or blockinfo for anon users through list=users; groups, registration, and emailable of course don't make sense for anon users. This patch should do that. It adds an extra query if any anon users are specified and editcount is requested, and adds an extra query if any anon users are specified and blockinfo is requested, for a total of two possible extra queries. If no anon users are specified or neither of those two options are specified, no extra queries are performed. I also incidentally fixed a PostgreSQL error, PostgreSQL requires the optional "AS" in column aliases. If you WONTFIX the patch, please pick up that minor fix.
(In reply to comment #0) > Created an attachment (id=5821) [details] > Patch against r47324 > > It would be nice to be able to query the editcount and/or blockinfo for anon > users through list=users; groups, registration, and emailable of course don't > make sense for anon users. > > This patch should do that. It adds an extra query if any anon users are > specified and editcount is requested, That query was pretty evil in terms of performance, which is why the editcount for anons won't be implemented. > and adds an extra query if any anon users > are specified and blockinfo is requested, for a total of two possible extra > queries. If no anon users are specified or neither of those two options are > specified, no extra queries are performed. > The blockinfo part isn't very useful, as that information is already available through list=blocks&bkip=IP (for one IP; also considers rangeblocks) or list=blocks&bkusers=IP1|IP2|... (multiple IPs/users, doesn't consider range blocks), and these methods give more detailed information. Considering this, the value of usprop=blockinfo is doubtful as it is. Closing the bug as WONTFIX on the grounds mentioned above. > I also incidentally fixed a PostgreSQL error, PostgreSQL requires the optional > "AS" in column aliases. If you WONTFIX the patch, please pick up that minor > fix. > Picked up that and the indentation fix around line 123 in r47333.
(In reply to comment #1) > (In reply to comment #0) > > This patch should do that. It adds an extra query if any anon users are > > specified and editcount is requested, > That query was pretty evil in terms of performance, which is why the editcount > for anons won't be implemented. I was afraid of that, even though an EXPLAIN on my (empty) local database looked promising.
*** Bug 71683 has been marked as a duplicate of this bug. ***