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

    jjj.westra

    08/16/2021, 5:35 PM
    well i have been using typescript for 5 months only so perhaps there is a way I am not familiar with
  • m

    Marky

    08/16/2021, 5:50 PM
    Is there a way to do a select & update atomically with the client?
  • m

    Marky

    08/16/2021, 5:51 PM
    As far as I can see, upsert won't allow you to get the data first to use it in the update. (aka insert balance + 5)
  • b

    BabyWolfman

    08/16/2021, 6:42 PM
    hello! I've been running into some trouble with storage uploads. Everything works fine running locally, but when I deploy to vercel I get RLS errors on any uploads. I double checked the policy on the bucket and it should be fine, and uploads from localhost to the bucket work just fine. Thanks in advance!
  • y

    Yggdrasill

    08/16/2021, 7:10 PM
    Isn't it vulnerable against XSS attacks?
  • m

    Mihai Andrei

    08/16/2021, 8:24 PM
    Depends on how you make your app
  • f

    florian-lefebvre

    08/16/2021, 9:56 PM
    Did you update the redirect url in the api settings? It's set to localhost:3000 by default
  • f

    florian-lefebvre

    08/16/2021, 9:57 PM
    I don't know if that's the cause of your issues but it might be
  • b

    BabyWolfman

    08/16/2021, 9:58 PM
    @User I thought to try that too, thanks. Actually I'm thinking this could have all been user error on my part... I moved on to something else and deployed to another branch url on vercel and now it's working so IDK
  • u

    user

    08/17/2021, 1:07 AM
    I've been trying to play around with supabase all day via vanilla JavaScript. I can connect to the database, however I cannot do CRUD operations (because I don't see any documentation for CRUD in vanilla JS). Is there anyone who can give me an example of any CRUD function using vanilla JS? p.s. Since my files aren't modular, I think I have to use fetch functions.
  • k

    KrisCoulson

    08/17/2021, 1:13 AM
    @User https://supabase.io/docs/reference/javascript/select on the left sidebar under
    data
    has documentation for crud actions
  • k

    KrisCoulson

    08/17/2021, 1:16 AM
    and @User not exactly what you are looking for but here is an example repo for trying authentication out in a vanilla js app
  • k

    KrisCoulson

    08/17/2021, 1:16 AM
    https://github.com/supabase/supabase/tree/master/examples/javascript-auth
  • u

    user

    08/17/2021, 1:20 AM
    It's a push in the right direction, so I am thankful.
  • k

    KrisCoulson

    08/17/2021, 2:46 AM
    Hey I was wondering if anyone would be able to point me in the right direction to debugging a long query. I am running my app with redwoodjs/prisma & supabase and I host it on netlify. I noticed on my production site that my query seems to be running really slow. TTFB on prod is 3.5s. Connecting my local environment to my productions database TTFB is less than 1s. I know this query is a larger query with nested models. I didn’t want to rely on the browser to check out the request so added some tracing to monitor the request. When running the request locally to my production database is roughly 365ms
 
 running the same query on production database from production serverless function is roughly 2584ms which is 7x slower
 One thought that came to mind is the potentially the serverless function is hosted by default on us-east, where my supabase instance is on us-west any other thoughts why I might be hitting a bottleneck?
  • k

    KrisCoulson

    08/17/2021, 2:46 AM
    localhost with prod db
  • k

    KrisCoulson

    08/17/2021, 2:46 AM
    production app with prod db
  • u

    __ianjasper

    08/17/2021, 2:51 AM
    is postgres support full text search on json? or if ever is it not recommended as it is not efficient as simple column like text/varchar
  • k

    KrisCoulson

    08/17/2021, 6:00 AM
    So after doing some digging and experimentation I have noticed that my performance significantly gets degraded when using the pg_bouncer connection string and that using the normal database connection the long requests were cut by more than half. Has anyone from the supabase team had a similar experience?
  • d

    Darkwebplayer

    08/17/2021, 6:50 AM
    is supabase api down ? i cant acess it from my app or even the website
  • d

    Darkwebplayer

    08/17/2021, 6:51 AM
    please someone do reply , i have an app running in production which uses supabase as backend
  • p

    Peanut

    08/17/2021, 8:11 AM
    Does the SQL server respond?
  • d

    Darkwebplayer

    08/17/2021, 8:16 AM
    Via api? no. But i tried a select query on supabase control panel sql and it works fine from there
  • p

    Peanut

    08/17/2021, 8:17 AM
    The console works for me
  • l

    laznic

    08/17/2021, 8:38 AM
    Should
    pg_net
    requests be able to be performed inside loops?
  • d

    Darkwebplayer

    08/17/2021, 8:43 AM
    i contacted
    beta@supabase.io
    , It was some internal error due to they rolling some upgrades and they fixed it for me when i mailed. ♥️
  • p

    Peanut

    08/17/2021, 9:12 AM
    Awesome
  • v

    Vinzent

    08/17/2021, 11:35 AM
    Why can't I create a trigger on
    auth.users
    with the
    postgres
    user from a third party tool, but with the
    supabase_admin
    user from
    app.supabase.io
  • s

    Shiznat

    08/17/2021, 12:04 PM
    hey all, having a hard time finding docs about this or i'm searching wrong. how can i create a new role in the roles table and associate it to a user? for now i created my own roles table for custom roles
  • t

    TM

    08/17/2021, 12:28 PM
    Hi, if I want to prevent a column from being updated, is the best approach to use a trigger or configure roles? I have an updated_at column that automatically get set to the current time, but I want to prevent someone from passing through a value when updating a row.
1...535455...316Latest