Hacker News new | past | comments | ask | show | jobs | submit login

I might be misunderstanding your point, but Postgresql functions can take (and return) tables:

    CREATE FUNCTION fullname(person) RETURNS TEXT AS $$
    SELECT $1.firstname || ' ' || $1.lastname
    $$ LANGUAGE SQL
Could you go into a more detail wrt using lateral joins with set returning functions? I'm used to using them as a way to "extend" the row with later terms depending on prior terms as you say, but I'm not comprehending the srf case so well (or tbh the results that pop up when I search for "posrgresql set returning function").



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: