4 ms·
In Postgresql, Lateral Joins enable function chaining for set returning functions. ie you can feed the results of earlier srf function to the arguments of follo
by garyclarke27 8y ago
In Postgresql, Lateral Joins enable function chaining for set returning functions. ie you can feed the results of earlier srf function to the arguments of following function.
This gets around one of Postgresql most glaring omissions - table valued parameters. Is incredibly useful once you get used to them.
- andreareina 8y agoI 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").