On 2015-08-27 03:29 PM, Simon Slavin wrote:
>
> Sure.  I chose to use an alias just to emphasise how wrong the result looked. 
>  However, I have seen code written by teams where the person writing the 
> query has no real idea whether they're querying a TABLE, a VIEW, or a virtual 
> table.  They could end up using a column called 'rr' without any 
> understanding of how it is generated.  And they would be disconcerted by a 
> result like the above.
>

I agree, and your example was quite clear but there were replies which 
seemed to have attached the meaning I described.

As for the specific idea that the average assumption leans toward one 
expectation... well yes, and I will agree that people might find a 
certain interpretation problematic or unintuitive or just outside of the 
assumption - but then we have all done that, haven't we? Usually a quick 
scan of the standard and/or the documentation sets us straight. There is 
no reason to cater for what people might expect to happen, there is only 
an obligation to adhere to the standard and, where that might be fuzzy, 
document the implementation specifics well.

(I am not advocating that SQLite (or indeed Postgres) does either of the 
above 100% correctly either... I am merely pointing out that unique 
expectations need not necessarily be served).

Reply via email to