[Ur] Mysterious behavior: Simple example DOES NOT compile using table named `thing` - but identical code DOES compile and run fine after renaming table `thing` to table `t`

Adam Chlipala adamc at csail.mit.edu
Fri Jul 24 16:22:33 EDT 2015


Just to be explicit about what's going on here: in contexts where only 
one table can be in scope (e.g., 'DELETE' or 'UPDATE'), that one table 
is always called [T] in types, and the frontend desugars standard SQL 
syntax to include projections from [T].  If you add an explicit table 
name somewhere, then that desugaring is not applied.

On 07/24/2015 05:04 AM, Chris Double wrote:
> On Fri, Jul 24, 2015 at 5:13 PM, Stefan Scott Alexander
> <stefanscottalexx at gmail.com> wrote:
> Z
>> (I could've sworn I had tried different variants such as `thing.Id` or `Id`
>> in that dml delete statement - but I guess I didn't; the late hour must have
>> been getting to me. =)
>
> I've done the same thing - I've learnt to recognise when it's a table
> name included where it shouldn't be in errors now...most of the time
> anyway!
>




More information about the Ur mailing list