SkullCutter
05/30/2022, 9:49 AMsetof <table_name>, but I can't find any documentation on how to extend the set to include other properties or perhaps other tablesNeedle
05/30/2022, 9:49 AMAlbert [tox/cis]
05/30/2022, 1:24 PMcreate or replace function functionName() returns json
language plv8
as
$$
  var somequery = plv8.execute('<your query>');
  var result = {'key': somequery};
  
  result['otherdata'] = [];
  
  var otherdata = plv8.execute('<other query>');
  for (const res of otherdata) {
    result['otherdata'].push(res);
  }
  return result;
$$;Needle
05/30/2022, 1:24 PMSteve
05/31/2022, 4:33 PMsql
CREATE FUNCTION.. RETURNS TABLE(col1 int, col2 text)
To return columns from different tables.
https://www.postgresql.org/docs/current/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-TABLESkullCutter
06/01/2022, 12:07 AMAlbert [tox/cis]
06/01/2022, 7:25 AM