I'm sorry. Now things sound even more confusing for me.

>From one side you've said that "No, this function is never working in a 
useful way." (but my example from the post shows, how it works in the 
beginning and then stops working for datatime, which means it was pretty 
much useful for some very common cases)

>From another side, you have accepted tickets, to make this function works 
in a useful way.

So it very looks like you've made a function, that returns something, that 
very looks like SQL, but shouldn't be used as SQL, it is just for debug, 
and you have a bunch of tickets to make SQL-like debug text to be working 
as real SQL.

So, my humble suggestion here is very simple. If you don't want something 
to be used in an appropriate way, don't make it looks like it can be used 
this way. 

 

On Thursday, September 10, 2020 at 1:40:33 PM UTC+3 f.apo...@gmail.com 
wrote:

> On Thursday, September 10, 2020 at 11:16:56 AM UTC+2 Alexander Lyabah 
> wrote:
>
>> The problem with the function is that it is actually working, but not 
>> always, and because of that, other people are suggesting it on 
>> StackOverflow, using it in prod, and may, eventually catch weird 
>> exceptions, which leads to a bad experience with Django in general.
>>
>
> No, this function is never working in a useful way. It does client side 
> interpolation of query params which should be done by the drivers instead, 
> even when it works it is potentially dangerous. The actual problem is that 
> people on StackOverflow recommend to use it. FWIW Since it is solely a 
> debugging aid I'd actually break any usage of it by adding "--" to the 
> start of it (or similar)
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/487cadce-51db-418f-aca4-ebe14aa16bb9n%40googlegroups.com.

Reply via email to