Skip to main content

All Questions

0 votes
1 answer
56 views

Can't add trigger on insert in auth.Users in Supabase

I tried to create a trigger on auth.users to add information to a public table, but for some reason, it caused issues during registration. I get the following error: AuthApiError: Database error ...
DepressedChalk's user avatar
0 votes
0 answers
55 views

Update join effect not visible in first run of select

I have this very strange behavior using pglite (PostgreSQL version 16) in Firefox, where I run an UPDATE JOIN, and then a SELECT which the first time around doesn't reflect the change made by the ...
Ludovic Aubert's user avatar
0 votes
2 answers
814 views

Prisma migration error: "type "serial" does not exist" despite using PostgreSQL 15

I'm trying to run a migration in my Prisma project, but I'm encountering the error "type "serial" does not exist", even though I'm using PostgreSQL 15.8, which should support this ...
seven's user avatar
  • 1,714
2 votes
2 answers
111 views

Alternative to \p{Lo} Unicode Class in PostgreSQL Regex

I encountered a problem when working with regular expressions in PostgreSQL. It turns out that PostgreSQL has no support for the \p{Lo} class, which corresponds to the "Letter, Other" ...
Pavel Kuharuk's user avatar
1 vote
1 answer
1k views

Error: ON CONFLICT DO UPDATE command cannot affect row a second time

I have connected the Express Javascript framework to PostgreSQL. I am building small file upload project. I have 100000 CSV data to upload and I have to do it fast. I have to insure that user_email is ...
Sohail Shaikh's user avatar
4 votes
1 answer
2k views

How can I generate Prisma CUID's when using sql?

I have a Prisma ORM server for my database. I am trying to use the cuid() function outside of the prisma schema.prisma file, but I don't see any package that imports that function and I don't know ...
GABRIEL R GARCIA-AVILES's user avatar
2 votes
2 answers
6k views

How to Use AND Operator with OR Condition in Supabase Query?

I'm working on a query in Supabase where I need to select specific columns from a table based on multiple conditions. Specifically, I need to select columns a, b, and c from a table where column e is ...
user24297792's user avatar
0 votes
1 answer
111 views

Supabase function work only when added in dbms, but not through query

I have two tables, feedback and quests. feedback table: create table public.feedback ( id bigint generated by default as identity, created_at timestamp with time zone not null default now(), ...
Scheffio's user avatar
0 votes
1 answer
55 views

Querying multiple rows of a table shows an [object] [object] instead of the actual data. How to fix?

I have this query: const {data, error} = await supabase .from('profiles') .select(` *, station ( station_name, user_id ), type ( ...
JS3's user avatar
  • 1,879
0 votes
0 answers
43 views

SQL: How to filter product with all listed attribute_value IDS PostgreSQL?

I'm using TypeORM query builder to filter my products. Here is my Product entity: @Entity() export class Product extends MedusaProduct { @ManyToMany(() => AttributeValue) @JoinTable() ...
Viktor's user avatar
  • 118
1 vote
1 answer
2k views

PostgreSQL with JS Drizzle passing array as string getting extra ""

I'm using Drizzle and I'm passing array variable into Raw SQL const variable = 'value 1,value 4' SELECT * FROM value_table WHERE ARRAY [${variable}] && array_values But looking at output I'm ...
Marius's user avatar
  • 2,018
1 vote
1 answer
186 views

Sequelize injecting id attribute into select clause breaking query

I was able to summarize multiple attributes on a table without grouping like so: Post.findAll({ attributes: [ [sequelize.literal(`COALESCE(SUM("Post"."characterCount"), 0)`), ...
tybro0103's user avatar
  • 49.8k
2 votes
0 answers
302 views

How to upsert new records with DEFAULT as id to Postgres from node.js

I'm using NodeJS and pg with a PostgreSQL database for the backend. I'd like to upsert multiple rows to a table in a single statement, using id (which is BIGSERIAL PRIMARY KEY NOT NULL) to check if ...
jsUser100's user avatar
1 vote
0 answers
58 views

Returning incorrect data from sql query using Node.js

I am having an issue where I need to fetch certain records based on the current user timezone. The timezone is stored and accessible, but one problem I am running into is that when I run a query in my ...
vincentyeung's user avatar
-1 votes
1 answer
375 views

postgreSQL query only users that their id is in the array

I'm using postgreSQL as my database for node.js app, I'm given an array of id's for example ["1","2","3"], and I want to query only users that their id is include in this ...
Niv's user avatar
  • 133

15 30 50 per page
1
2 3 4 5
21