jason-lynx
09/21/2021, 2:52 AMGRANT ALL ON <view name> TO service_role
jason-lynx
09/21/2021, 2:52 AMauthenticated
as the owner of the viewjason-lynx
09/21/2021, 2:53 AMPeanut
09/21/2021, 2:59 AMauthenticated
then it started being restrictedPeanut
09/21/2021, 2:59 AMjason-lynx
09/21/2021, 3:07 AMSETY
09/21/2021, 10:44 AMSETY
09/21/2021, 10:44 AMSETY
09/21/2021, 1:30 PMLuddensEkko
09/21/2021, 6:17 PMSETY
09/21/2021, 11:59 PMstibbs
09/22/2021, 8:18 AMvalid_until
. Below does not work.
ts
await supabase
.from('posts')
.update({ valid_until: `now() + interval '30 day'` })
.eq('id', postId);
However using just .update({ valid_until: 'now()'})
works (but doesn't achieve my goal)bnjmnt4n
09/22/2021, 8:50 AMsupabase.rpc
in which you can then use whatever SQL expressions you needstibbs
09/22/2021, 8:51 AMstibbs
09/22/2021, 9:15 AMbnjmnt4n
09/22/2021, 1:11 PMMattias
09/22/2021, 2:45 PMra9
09/25/2021, 11:48 AMra9
09/25/2021, 11:49 AMsql
-- CreateTable
CREATE TABLE "User" (
"uid" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3),
"username" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"role" "Role" NOT NULL DEFAULT E'USER',
CONSTRAINT "User_pkey" PRIMARY KEY ("uid")
);
ra9
09/25/2021, 11:49 AMsilentworks
09/25/2021, 12:04 PMstibbs
10/01/2021, 2:16 AMmy_func
(which means I have duplicates). How do I force the replace
part to work?
create or replace function my_func(...
jason-lynx
10/01/2021, 2:21 AMstibbs
10/01/2021, 2:22 AMstibbs
10/01/2021, 2:22 AMjason-lynx
10/01/2021, 2:23 AMstibbs
10/01/2021, 2:23 AMstibbs
10/01/2021, 2:25 AMSETY
10/01/2021, 1:47 PMsilentworks
10/01/2021, 2:21 PM