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

    a d

    07/30/2021, 3:37 PM
    in SQL editor section
  • a

    a d

    07/30/2021, 3:37 PM
    and i m doing
  • a

    a d

    07/30/2021, 3:38 PM
    Copy code
    js
    const { data, error } = await supabase
          .rpc('Create table')
  • s

    Scott P

    07/30/2021, 3:41 PM
    Yeah, that's not a stored function. Just because it's stored inside the web-based query editor, it doesn't mean it's a stored function inside the DB. A stored function looks something like this:
    Copy code
    sql
    CREATE OR REPLACE FUNCTION public.some_function()
    RETURNS boolean
    LANGUAGE plpgsql AS $$
    BEGIN
      --  Your query code goes here
    END;
    $$;
    The open and saved queries on the dashboard are saved in your browser, and only really exist to make it easier for you to run common queries. Take a look at https://www.postgresqltutorial.com/postgresql-create-function/ for more details on creating functions. Gonna open a thread from here if you want to discuss further 🙂
    a
    • 2
    • 46
  • r

    Rakox

    07/30/2021, 4:54 PM
    I have an error when I try to start supabase with docker compose locally. I followed the guide for Selfhost https://supabase.io/docs/guides/self-hosting), I used
    supabase eject
    to create the docker-compose.yml Does anyone have an idea?
    Copy code
    Creating supabase-mail ... error
    Creating supabase-db   ...
    Creating supabase-kong ...
    
    Creating supabase-db   ... error
    6783a03a7ef845b9c8e357e587e38fa12". You have to remove (or rename) that container to be able to reuse that name.
    
    ERROR: for supabase-db  Cannot create container for service db: Conflict. The container name "/supabase-db" is already in use by container "4e98ca987c72bd9b6466ed5c4ddf86ef12d4aCreating supabase-kong ... error
    
    ERROR: for supabase-kong  Cannot create container for service kong: Conflict. The container name "/supabase-kong" is already in use by container "0a4aac0d7df49eb60e2e842c9a4e14aedb0d1e306aa3ebee295a09eda73b2215". You have to remove (or rename) that container to be able to reuse that name.
    
    ERROR: for mail  Cannot create container for service mail: Conflict. The container name "/supabase-mail" is already in use by container "3a9b049efcfe34d6b24667c1c2f42fa6783a03a7ef845b9c8e357e587e38fa12". You have to remove (or rename) that container to be able to reuse that name.
    
    ERROR: for db  Cannot create container for service db: Conflict. The container name "/supabase-db" is already in use by container "4e98ca987c72bd9b6466ed5c4ddf86ef12d4a549a17842b2979ee0396c456b24". You have to remove (or rename) that container to be able to reuse that name.
    
    ERROR: for kong  Cannot create container for service kong: Conflict. The container name "/supabase-kong" is already in use by container "0a4aac0d7df49eb60e2e842c9a4e14aedb0d1e306aa3ebee295a09eda73b2215". You have to remove (or rename) that container to be able to reuse that name.
    ERROR: Encountered errors while bringing up the project.
    s
    m
    e
    • 4
    • 51
  • m

    magicquin

    07/30/2021, 5:03 PM
    So with my on gong mission to get odoo installed
  • m

    magicquin

    07/30/2021, 5:07 PM
    WARNING ? odoo.service.server: Thread virtual real time limit (132/120s) reached.
  • m

    magicquin

    07/30/2021, 5:08 PM
    as well as the fol;lowing
  • m

    magicquin

    07/30/2021, 5:09 PM
    odoo.service.server: Dumping stacktrace of limit exceeding threads before reloading , 2021-07-29 09:59:24,759 1 INFO ? odoo.tools.misc: ,
  • u

    user

    07/30/2021, 5:23 PM
    I'm getting this error when I try to duplicate my supabase table.
  • e

    ehesp

    07/30/2021, 6:57 PM
    Hey all, When I get redirected back from my application from an OAuth provider login, the initial user session is
    null
    , and then gets replaced with the user afterwards. This is causing issues, as I'm trying to perform an API call when the page loads, but if the user is
    null
    (and my session has not been set), the API call fails since it's being executed (from a hook) before it knows I'm authenticated
  • u

    user

    07/30/2021, 7:04 PM
    Hi all,
  • u

    user

    07/30/2021, 7:06 PM
    fails with my db definition being
  • u

    user

    07/30/2021, 7:06 PM
    the error is " {"hint":null,"details":"Key (vi_usuario_rut)=(5318609-2) already exists.","code":"23505","message":"duplicate key value violates unique constraint \"idx_visitas_usuarios\""}"
  • u

    user

    07/30/2021, 7:07 PM
    looks like it's trying to insert instead of update the row ... what am i missing? thanks
  • b

    Bryan K.

    07/30/2021, 9:01 PM
    If you were to host the backend of a blog on Supabase, where/how would you store the content so that you could also have a full-text search of the site? If the source content is markdown, is there a data type best for that?
  • c

    copple

    07/31/2021, 3:26 AM
    https://discord.com/channels/839993398554656828/843999948717555735/870692478154571826 Very helpful Chron
  • a

    a d

    07/31/2021, 3:28 AM
    truly
  • c

    copple

    07/31/2021, 3:31 AM
    @Rakox looks like you have multiple running. Try stopping all services first using
    docker-compose down
    or
    supabase stop
  • a

    a d

    07/31/2021, 3:32 AM
    @User I think documentation is not clear enough for newcomers on how can they create RPC i thought i was creating queries when i was just saving it in web i think there should be some link or something by which readers can get some idea (especially new comers)
  • k

    Khan W

    07/31/2021, 6:33 AM
    ^^ I was literally just about to ask something about RPCs
  • k

    Khan W

    07/31/2021, 6:33 AM
    I can't find documentation anywhere on how they're created or where I can find that
  • u

    Ulbrecht

    07/31/2021, 7:52 AM
    yes please
  • d

    DharmaraJ

    07/31/2021, 8:34 AM
    I'm new to SQL
  • d

    DharmaraJ

    07/31/2021, 8:34 AM
    How does these IDs make a difference?
  • d

    DharmaraJ

    07/31/2021, 8:34 AM
    int2
    ,
    int4
    and
    int8
    specifically
  • s

    silentworks

    07/31/2021, 8:41 AM
    I think this is best explained here https://www.postgresql.org/message-id/Xns944F77CD21F46rr8xca@200.46.204.72
  • d

    DharmaraJ

    07/31/2021, 8:42 AM
    Thanks, I was confused when all they types actually had same output
  • s

    silentworks

    07/31/2021, 8:42 AM
    The Supabase team will be simplifying this at some point as its causing confusion amongst users who don't have a SQL background
  • d

    DharmaraJ

    07/31/2021, 8:42 AM
    Great! Thanks 🙂
1...272829...316Latest