Denzo
02/17/2022, 10:22 AMsql
create or replace function create_planet(new_planet "planet")
returns varchar
language plpgsql
as $$
declare
new_row bigint;
begin
insert into public."planets"(new_planet)
values(new_planet)
returning "id" into new_row;
return new_row;
end;
$$
Denzo
02/17/2022, 10:25 AMSELECT *
all records), so I want to enable RLS and expose the required functionality through RPCs. But I don't really feel like adding every column of the table as a param, since it would become a huge methodDenzo
02/17/2022, 10:27 AMsilentworks
02/17/2022, 10:35 AMsilentworks
02/17/2022, 10:35 AMDenzo
02/17/2022, 10:37 AMDenzo
02/17/2022, 10:39 AMDenzo
02/17/2022, 11:46 AMauth.uid()
Denzo
02/17/2022, 11:46 AMsilentworks
02/17/2022, 2:56 PMDenzo
02/17/2022, 3:58 PM