MDobs
03/22/2022, 2:43 PMSELECT * FROM users
Scott P
03/22/2022, 2:44 PMSETOF users
(if your table is users). May need to clarify it with a schema e.g. SETOF public.users
MDobs
03/22/2022, 2:46 PMsetof
optionMDobs
03/22/2022, 2:46 PMScott P
03/22/2022, 2:48 PMrecord
returns the correct typeMDobs
03/22/2022, 2:49 PM"message":"input of anonymous composite types is not implemented","code":"0A000"
with
var users = plv8.execute(
`select * from users`
);
return users
Scott P
03/22/2022, 2:50 PMMDobs
03/22/2022, 2:51 PMMDobs
03/22/2022, 2:56 PMid
from int8 to int4 make it possible to get some json data with the above code.
otherwise a TypeError: Do not know how to serialize a BigInt
Scott P
03/22/2022, 2:59 PMsql
create or replace function select_users_v8()
returns SETOF auth.users as $$
var num_affected = plv8.execute(
'SELECT * FROM auth.users'
);
return num_affected;
$$ language plv8;
SELECT * FROM select_users_v8()