﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21757	Allow modifying the SQL generated by lookups	shmishleniy@…	nobody	"Hi!
I know that you guys rejected all [https://code.djangoproject.com/ticket/17473 issues] to implement LIKE and ILIKE
Sorry but I would like to try one more time because I don't understand this limitation of your orm system.

1. We need to update [https://docs.djangoproject.com/en/dev/ref/models/querysets/#std:fieldlookup-contains fieldlookup-contains] docs . There is no specified about your guys fixes of icontains (UPPER LIKE instead of ILIKE) on Postgressql database. 


2. Regarding [https://code.djangoproject.com/ticket/3575 ""postgres backend should optimize iexact searches""] task ([https://github.com/django/django/commit/3df7266056 GitHub source code]) we have auto optimization that forced us to use UPPER LIKE. For fully functional orm system is good practice to give your users possibility to ""easy"" build whatever they like request. Now on postgresql database ""out of the box"" we can't use ILIKE at all. We always need to add custom lookup to manage with this problem.

Example of ILIKE/UPPER LIKE usage ypou can find in my [https://code.djangoproject.com/ticket/3575#comment:27 comment]"	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	wontfix	postgresql like ilike icontains		Accepted	0	0	0	0	0	0
