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

    samefold

    09/02/2021, 1:16 AM
    For example, let's say I have a table like this:
    Copy code
    -----------------------------------------------------------
    | user_id | first_name | last_name | email_address | role |
    -----------------------------------------------------------
    In an UPDATE operation, how could I allow users to edit some but not all fields for their own record? Obviously it's not good if a customer can make themselves an administrator or change their
    user_id
    .
    j
    • 2
    • 6
  • j

    jason-lynx

    09/02/2021, 2:37 AM
    rls
  • j

    jbergius

    09/02/2021, 3:14 AM
    nextjs-subscription-auth
  • e

    Evаn

    09/02/2021, 4:57 AM
    is there something like CREATE OR ALTER POLICY in postgresql? since policies are just code and contain no data, I'd really like to be able to define them declaratively rather than make them with imperative commands
  • e

    Evаn

    09/02/2021, 5:10 AM
    I guess I can probably drop and recreate them without losing anything, though if I remove a policy then a single definition sql file wouldn't sync that... unless I somehow iterate all policies and drop them before recreating
  • o

    Ox

    09/02/2021, 8:32 AM
    trying to connect to a supabase db via pgadmin but im getting this error:
    Copy code
    Unable to connect to server:
    
    could not connect to server: Connection refused
    Is the server running on host "db.asdasdasdasdasd.supabase.co" (XX.XX.XXX.XXX) and accepting
    TCP/IP connections on port 5432
    i tried connecting via ssl using an crt file as well as via password. both gave the same response. i tried looking it up and all the answers say to configure the config file for the postgres server, but im not sure how to do that on supabase
    j
    w
    s
    • 4
    • 12
  • j

    jason-lynx

    09/02/2021, 9:18 AM
    pgadmin
  • k

    knight

    09/02/2021, 10:48 AM
    anyone can help for the storage move object API ?
  • t

    tinjaw

    09/02/2021, 11:34 AM
    I need help. I am putting together a PoC for my employer. I have to show my progress today. I have been having issues getting my realtime connection to Supabase working. The project is at risk of being scrapped. I am legally disallow to compensate anybody for anything.
  • t

    tinjaw

    09/02/2021, 11:35 AM
    I am hoping somebody the community could help me in these last few hours get it working.
  • t

    tinjaw

    09/02/2021, 11:37 AM
    #1 Question: I am working on codesandbox.io. I don't have any reason to believe that it is the cause of my issues. However I am not positive. Does anybody have any evidence for or against codesandbox.io working fully with Supabase?
  • t

    tinjaw

    09/02/2021, 11:38 AM
    I am using node/react/nextjs
  • f

    Fabian B.

    09/02/2021, 11:58 AM
    Hey there, does anyone have the same problem? I load 5 data endpoints in the initial load of my app. The normal time for the requests is ~70ms. But there ist almost everytime one of the 5 requests which takes 5–10 seconds. All TTFB time. No content download, because the content is also like all others only a few bytes. And evertime, it's a different endpoint. I am thankful for any thought on this!
  • f

    Fabian B.

    09/02/2021, 12:00 PM
    @User Could you maybe explain what type of issue you exactly have? maybe then somebody can help
  • t

    tinjaw

    09/02/2021, 12:29 PM
    Yes, I use createClient and the supabase module, but I can never get results in any of my programs. But I can get results using curl/HTTPie
  • t

    tinjaw

    09/02/2021, 12:32 PM
    I have tried using example projects linked to in the documentation, but each one is written differently and requires customization and never ends up working.
    f
    s
    j
    • 4
    • 14
  • m

    Michael Ketzer | streamgeist.com

    09/02/2021, 4:18 PM
    So, uhm, RLS is not working for realtime subscription on supabase, is that correct or did I miss to configure something?
  • s

    silentworks

    09/02/2021, 4:21 PM
    This is correct, it's on the roadmap.
  • j

    jonny

    09/02/2021, 4:22 PM
    We'll make some changes in the dashboard to show realtime RLS is not enabled yet. I can confirm though, it is being worked on.
  • m

    Michael Ketzer | streamgeist.com

    09/02/2021, 4:24 PM
    Errr.... okay, that is sad. I actually never questioned it, just found out now when almost finished all the logic. 😆 Thank you 🙏
  • m

    Michael Ketzer | streamgeist.com

    09/02/2021, 4:24 PM
    This will be definitely helpful! Thank you 😊
  • j

    jonny

    09/02/2021, 4:32 PM
    @User to answer your question regarding encryption on rest https://github.com/supabase/supabase/discussions/3038
  • t

    tinjaw

    09/02/2021, 5:01 PM
    Related to my current issue/thread: Does anybody have an example of a CRUD app, using Supabase as database and some editable data grid on the frontend using React or Next.js?
  • m

    mycroft_here

    09/02/2021, 5:09 PM
    How do I use multiple queries parameters in
    .eq()
    . I am trying to do it like this
    Copy code
    const { data: subscribers, err } = await supabase
        .from("subscribers")
        .select("*")
        .eq(["newsletter_id", letterId, "email", email]);
    But its not working. Any solution?
  • s

    Scott P

    09/02/2021, 5:30 PM
    I believe you can chain
    .eq
    to add additional filtering
  • u

    user

    09/02/2021, 5:31 PM
    What would be the best way to implement business logic? Calling some external API service?
  • m

    mycroft_here

    09/02/2021, 5:33 PM
    chaining means using multiple
    .eq()
    ? Let me try that and see.
  • s

    Scott P

    09/02/2021, 5:34 PM
    Yep -
    from("subscribers").select("*").eq("newsletter_id", letterId).eq("email", email)
    should work
  • w

    waptik

    09/02/2021, 5:34 PM
    Thanks for the last sentence. It helped solved my issue. But this is still an issue that needs to be addressed. One weird thing i noticed before finding this comment, if you use
    upsert
    of client library, the id auto generates. But when you use
    insert
    , the id is not auto generated.
  • m

    mycroft_here

    09/02/2021, 5:38 PM
    Thanks @User this solution is working
1...707172...316Latest