Village
01/05/2022, 6:40 PMeldelentes.eth
01/05/2022, 8:06 PMmattmatt
01/05/2022, 8:17 PM\password postgres
< is this possible? I'm getting ERROR: 42501: must be superuser to alter replication roles or change replication attribute
when I trymattmatt
01/05/2022, 8:25 PMsilentworks
01/05/2022, 8:32 PMwmd
01/05/2022, 9:46 PMwmd
01/05/2022, 9:46 PMAlf
01/05/2022, 10:06 PMsupabase init
based local development instance?silentworks
01/05/2022, 11:06 PMDaniel_pttb
01/06/2022, 3:19 AMgeordi
01/06/2022, 4:21 AMberu
01/06/2022, 6:47 AM.from.download()
returns old file after .from.update()
. the supabase ui shows the newly updated image, but on my client side the image is still the old one. has anyone had this problem before?binajmen
01/06/2022, 9:30 AMIvanSmiths
01/06/2022, 9:58 AMprisma.texture.findMany()
invocation:
Can't reach database server at `my credentials`:`5432`
Please make sure your database server is running at `my credentials`:`5432`.
The databse is not paused. Someone know why this happen?djhodor
01/06/2022, 10:05 AMlet query = this.supabase.from<SupabaseMessage>('request').select('*').order('created_at', { ascending: false }).limit(limit);
Then I created index in supabase's SQL editor:
CREATE INDEX idx_request_created_at
ON request(created_at);
It works well in the SQL editor, however it looks like it doesn't work when I'm querying data via the sdk (the index is not used, it takes ages to fetch these data).anand
01/06/2022, 10:41 AMktosiek
01/06/2022, 10:58 AMchipilov
01/06/2022, 11:01 AMxtc
01/06/2022, 11:03 AMdrpizza
01/06/2022, 11:17 AMSELECT
dob
FROM bday
WHERE date_part('day', dob) = date_part('day', CURRENT_DATE)
AND date_part('month', dob) = date_part('month', CURRENT_DATE)
ktosiek
01/06/2022, 12:22 PMNick
01/06/2022, 3:17 PMcreate or replace function get_or_create_api_key(user_id uuid)
returns varchar
language plpgsql
security definer
as $$
declare
kk varchar;
begin
select key from api_keys into kk where api_keys.user_id = get_or_create_api_key.user_id;
if not found then
select encode(digest(gen_random_bytes(32), 'sha256'), 'hex') into kk;
insert into api_keys(key, user_id)
values (kk, get_or_create_api_key.user_id);
end if;
return kk;
end;
$$;
I added the line security definer
with some help from another user in here because I was hitting a row level security violation without it, but I've realized, I think I do want row level security. Ideally, only the currently logged in user can fetch their API key or insert a new one. How would I do that?garyaustin
01/06/2022, 3:28 PMNick
01/06/2022, 3:29 PMauth.uid()
everywhere there?Nick
01/06/2022, 3:29 PMgaryaustin
01/06/2022, 3:31 PMNick
01/06/2022, 3:32 PMgaryaustin
01/06/2022, 3:32 PMNick
01/06/2022, 3:36 PMNick
01/06/2022, 3:39 PM