Skip to content

Instantly share code, notes, and snippets.

View jaylevitt's full-sized avatar

Jay Levitt jaylevitt

View GitHub Profile
@jaylevitt
jaylevitt / gist:1348110
Created November 8, 2011 15:43 — forked from anonymous/gist:1348102
Postgres doesn't do laterals...
select questions.id, qw.weightings
from questions
join question_weightings() as qw
on qw.question_id = questions.id
join expensive_function(qw.weightings) as ef
on ef.user_id = questions.user_id;