https://supabase.com/ logo
Join Discord
Powered by
# help
  • d

    donpuerto

    08/11/2021, 1:34 AM
    do i need to start with begin and end Theres really no instruction on how to use the module
  • s

    Scott P

    08/11/2021, 1:49 AM
    "How to call function in runtime?":
    .rpc()
    (https://supabase.io/docs/reference/javascript/rpc) "How to right function here?": https://www.postgresqltutorial.com/postgresql-create-function/
  • m

    Mattyfaz

    08/11/2021, 5:00 AM
    Hey all, is anyone able to help let me know what wildcard character can be used in the
    .eq()
    ? I've tried passing
    *
    as well as
    %
    but neither seems to work. Edit: Nevermind - changing them all to
    ilike()
    and
    %
    if there is no value solves it.
  • t

    TheOriginalDude

    08/11/2021, 5:18 AM
    Hey there, I have an open source project running on Supabase. And, I want people to be able to self host it too, So How do I export the SQL for my DB so, others can easily apply and use it too?
    s
    • 2
    • 4
  • t

    TheOriginalDude

    08/11/2021, 5:53 AM
    I tried doing this,
    Copy code
    sql
    CREATE OR REPLACE FUNCTION show_create_table(table_name text, join_char text = E'\n' ) 
      RETURNS text AS 
    $BODY$
    SELECT 'CREATE TABLE ' || $1 || ' (' || $2 || '' || 
        string_agg(column_list.column_expr, ', ' || $2 || '') || 
        '' || $2 || ');'
    FROM (
      SELECT '    ' || column_name || ' ' || data_type || 
           coalesce('(' || character_maximum_length || ')', '') || 
           case when is_nullable = 'YES' then '' else ' NOT NULL' end as column_expr
      FROM information_schema.columns
      WHERE table_schema = 'public' AND table_name = $1
      ORDER BY ordinal_position) column_list;
    $BODY$
    LANGUAGE SQL STABLE;
    
    SELECT public.show_create_table('Pastes');
    This doesn't work either.
  • r

    Riven

    08/11/2021, 8:11 AM
    Hi guys I'm new to supabase, a quick question: is there a transaction insert using supabase API? I cant seem to find it anywhere in the docs. Thanks!
    s
    • 2
    • 2
  • l

    laznic

    08/11/2021, 9:03 AM
    How would I go with selecting IDs from a table and sending those to a webhook via
    net.http_post
    ?
    s
    • 2
    • 12
  • e

    Enter

    08/11/2021, 10:09 AM
    Hello, this morning, my auth with Discord has stopped. Can you investigate the logs?
  • s

    silentworks

    08/11/2021, 11:49 AM
    Please use the feedback widget in the dashboard for this enquiry or email beta@supabase.io
  • e

    Enter

    08/11/2021, 11:52 AM
    Ok 🙂
  • k

    knight

    08/11/2021, 12:18 PM
    anyone trying to upload file for storage using the API ?
  • k

    knight

    08/11/2021, 12:18 PM
    direct API not with the client library
  • k

    knight

    08/11/2021, 12:20 PM
    the API doc https://supabase.github.io/storage-api/#/object/post_object__bucketName___ only show what to set for header, didn't mention the body, so I m lost on how to upload file with API
  • p

    Poypoypoy

    08/11/2021, 1:17 PM
    why i cant delete the user??
  • p

    Poypoypoy

    08/11/2021, 1:20 PM
    ah api? what do you mean?
  • s

    ShaneTheKing

    08/11/2021, 1:20 PM
    Because there's an item in the
    objects
    table that references the user you're trying to delete and if you delete the user the table will be in an invalid state with a broken foreign key reference. You'll need to delete the row from
    objects
    that depends on the user before you can delete the user
  • p

    Poypoypoy

    08/11/2021, 1:22 PM
    i deleted my table, i dont have any table right now.
  • p

    Poypoypoy

    08/11/2021, 1:23 PM
    this man , i dont have
  • p

    Poypoypoy

    08/11/2021, 1:45 PM
    i want to get only one result in storage found my answer in docs https://supabase.io/docs/reference/javascript/storage-from-getpublicurl
  • p

    Poypoypoy

    08/11/2021, 2:10 PM
    anyone done with getting image in storage?
  • p

    Poypoypoy

    08/11/2021, 2:38 PM
    why i received not support file in supabase storage, lord help me HAHHA
  • k

    Khan W

    08/11/2021, 2:44 PM
    Looking at the documentation for Sign In With Apple, I'm a bit confused. Is there no way for me to pass an authorization object to Supabase auth? In native iOS, apple will give an object with a JWT, refresh token and user info but the current library doesn't do that at all. The iOS library is modeled after the JS library, and I'm willing to update it to work, but is there a way to send the required objects to supabase auth using an API? Here's the docs https://supabase.io/docs/guides/auth/auth-apple#add-login-code-to-your-client-app
  • k

    Khan W

    08/11/2021, 2:53 PM
    I realized that when on the web it will open a URL where a user can sign in to apple and be redirected back to the page, but if I'm building on iOS I can have a native screen appear for the user to sign in with, so presenting a url with a sign in will be a super clunky UX
    • 1
    • 1
  • g

    GandalfG

    08/11/2021, 3:26 PM
    Quick question! When I try to add a post in the posts table, I can only do it when RLS is disabled. If i enable it and I allow insert access to authenticated users only, I get a 403 error back when I try to add the post.
  • s

    Scott P

    08/11/2021, 3:49 PM
    If your policy is changed to
    (auth.role()::TEXT = 'authenticated')
    , does it work then?
    g
    • 2
    • 16
  • g

    GandalfG

    08/11/2021, 3:27 PM
    Error
  • g

    GandalfG

    08/11/2021, 3:28 PM
    And this is my policy
  • s

    Scott P

    08/11/2021, 3:39 PM
    Does the
    error
    that you've destructured return anything?
  • g

    GandalfG

    08/11/2021, 3:45 PM
    Yes it does says this"new row violates row-level security policy for table \"posts"
  • g

    GandalfG

    08/11/2021, 3:45 PM
    But i have row lever sec enabled
1...454647...316Latest