https://supabase.com/ logo
Join DiscordCommunities
Powered by
# help
  • v

    Village

    01/05/2022, 6:40 PM
    Does supabase rely on snap for anything?
  • e

    eldelentes.eth

    01/05/2022, 8:06 PM
    I deleted all my existing projects in order to create another (Free tier) but I still get the "Limit projects" error, this happened to anyone before? How much time do I need to wait? I tried to contact the support team but the contact form gets me a 500 error.
    s
    • 2
    • 1
  • m

    mattmatt

    01/05/2022, 8:17 PM
    Copy code
    \password postgres
    < is this possible? I'm getting
    Copy code
    ERROR:  42501: must be superuser to alter replication roles or change replication attribute
    when I try
    s
    • 2
    • 6
  • m

    mattmatt

    01/05/2022, 8:25 PM
    Also, does the UI allow editing records? Or just the table attributes?
    s
    • 2
    • 10
  • s

    silentworks

    01/05/2022, 8:32 PM
    Postgres user is not a superuser
  • w

    wmd

    01/05/2022, 9:46 PM
    Unexpected token < in JSON bug is still persistent, how to fix?
  • w

    wmd

    01/05/2022, 9:46 PM
    I believe this is connected to the Cloudflare loading page.
  • a

    Alf

    01/05/2022, 10:06 PM
    Any idea on if it's possible to copy an existing Supabase project into a
    supabase init
    based local development instance?
    s
    • 2
    • 2
  • s

    silentworks

    01/05/2022, 11:06 PM
    Supabase project to local development
  • d

    Daniel_pttb

    01/06/2022, 3:19 AM
    Hi there, I'm using Sequin.io to sync airtable to a postgres hosted on Supabase. Now as part of the sync process, I believe Sequin.io made some permissions configs. As a result, realtime API does not seem to work for the schema / tables that Sequin.io created as part of the sync. Realtime API works for other normal tables created via Supabase's dashboard however. My question is – do I need to do some kind of co-ownership assignment or some kind of role permissions in order for Realtime API to work?
  • g

    geordi

    01/06/2022, 4:21 AM
    Hey there, are we able to use Twitters OAuth 2.0 with supabase? I want to reduce the number of scopes the connection asks for, as it prevents many users from authenticating with me. Thanks in advance!
  • b

    beru

    01/06/2022, 6:47 AM
    supabase storage
    .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?
  • b

    binajmen

    01/06/2022, 9:30 AM
    Someone has experience/opinionated articles about how to structure a database with internationalisation in mind in the case of a multi language web app? (happy new year to all πŸ˜‰ )
  • i

    IvanSmiths

    01/06/2022, 9:58 AM
    Hi all! I have a database on supabase, access it using prisma. Everything was working, but suddently it started not working anymore giving me this error Error: Invalid
    prisma.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?
  • d

    djhodor

    01/06/2022, 10:05 AM
    Hello, I have a following question: How should I create an index on my column when I'm using the supabase javascript sdk? I have a following query:
    Copy code
    let query = this.supabase.from<SupabaseMessage>('request').select('*').order('created_at', { ascending: false }).limit(limit);
    Then I created index in supabase's SQL editor:
    Copy code
    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).
    c
    g
    • 3
    • 19
  • a

    anand

    01/06/2022, 10:41 AM
    using discord oauth with supabase why isn't the access_token being sent as a query param?
    k
    x
    • 3
    • 8
  • k

    ktosiek

    01/06/2022, 10:58 AM
    fragment vs query
  • c

    chipilov

    01/06/2022, 11:01 AM
    Index not used when using supabase js client
  • x

    xtc

    01/06/2022, 11:03 AM
    Anyone know how you can enable multi organisations/projects with self-host?
    k
    • 2
    • 2
  • d

    drpizza

    01/06/2022, 11:17 AM
    Hi, If I have a date column and want to get anniversary/birthday (i.e. day and month match but not year) how can I do it with the Supabase API? The filters I have tried haven't worked This works in the supabase UI sql editor:
    Copy code
    SELECT
      dob
    FROM bday
    WHERE date_part('day', dob) = date_part('day', CURRENT_DATE)
      AND date_part('month', dob) = date_part('month', CURRENT_DATE)
    k
    m
    • 3
    • 9
  • k

    ktosiek

    01/06/2022, 12:22 PM
    birthday column
  • n

    Nick

    01/06/2022, 3:17 PM
    Hey folks, yesterday I posted this little SQL function snippet:
    Copy code
    create 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?
  • g

    garyaustin

    01/06/2022, 3:28 PM
    Without reading your entire function, you can use auth.uid() in a test or to provide the users real uid to selects and such.
  • n

    Nick

    01/06/2022, 3:29 PM
    Oh interesting... so I could basically remove the function parameter then and just use
    auth.uid()
    everywhere there?
  • n

    Nick

    01/06/2022, 3:29 PM
    and that would work with RLS?
  • g

    garyaustin

    01/06/2022, 3:31 PM
    Your function is ignoring RLS, you are basically doing the same thing RLS does by using auth.uid(). If you want to use RLS then you have to not use security definer and get the function to work with it. Once again I'm not looking at what you are actually doing in the function.
  • n

    Nick

    01/06/2022, 3:32 PM
    Ok, I see. And what does auth.uid() yield when there is no logged-in user?
  • g

    garyaustin

    01/06/2022, 3:32 PM
    null
  • n

    Nick

    01/06/2022, 3:36 PM
    great, thanks
  • n

    Nick

    01/06/2022, 3:39 PM
    Hm ok another question. I'm trying to build out my sign up page with https://supabase.com/docs/reference/javascript/auth-signup. I don't understand the flow for the case where a user tries to create an account that already exists... it seems that the user object for the existing user is returned, and no session
1...185186187...316Latest