Scott Rohde

Results 82 comments of Scott Rohde

@dlebauer It occurs to me now that I should update this function to update the `updated_at` column if it exists (and I think it always or nearly always does) and...

@dlebauer Bona fide “Stored Procedures” don’t appear in PostgreSQL until version 11 and we require only version 9.4, so I’ll take this in the informal sense of “function that doesn’t...

Resurrecting this: the covariate show page still needs work.

I think it's essentially a duplicate (except for the added information here about the Google fusion tables API). @dlebauer This is one reason I don't close issues until the bug...

I'm not sure exactly why the subselects aren't working the way one would expect (though I'm sure constraints have nothing to do with it). For now, you can use a...

It's probably a bit more intuitive to do things this way: ``` SELECT DISTINCT treatment_id FROM managements_treatments AS mt WHERE NOT EXISTS( SELECT 1 FROM traits_and_yields_view_private AS tyvp WHERE tyvp.treatment_id...

This is even simpler (and perhaps faster): ``` SELECT DISTINCT treatment_id FROM managements_treatments EXCEPT SELECT treatment_id FROM traits_and_yields_view_private ORDER BY treatment_id; ```

Mystery Solved! It appears that your original query didn't work because of SQL's perverse 3-valued logic. ``` SELECT treatment_id FROM managements_treatments WHERE treatment_id NOT IN (SELECT DISTINCT treatment_id FROM traits_and_yields_view_private);...

Sorry--I got it backwards: `x IN list` is never false if `list` contains a NULL, so `x NOT IN list` is never _true_ if `list` contains a NULL. This means...