178,989 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-2
votes
0
answers
30
views
Supabase realtime postgres changes with RLS policy [closed]
Im having an issue with supabase postgres changes. I have a subscription on frontend to watch for changes on a table using RLS policy to only see the changes of the current user.
The problem that im ...
-1
votes
0
answers
30
views
PostgreSQL installation error: "The database cluster initialization failed" [closed]
enter image description here
I’m trying to install PostgreSQL on Windows, but the installation fails during the post-installation step. During setup, I get this error message:
A problem occurred ...
Advice
0
votes
0
replies
42
views
How apply airflow db migration and save them into postgress docker image?
I use docker-compose to run airflow. Postgres section is
postgres:
image: postgres:12.16
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
test: [ "...
0
votes
1
answer
47
views
insert sample data into a postgresql in docker container not working [closed]
I am running a postgresql in docker container and trying to insert some sample data into this database.
prepare_source_data.sql exists in the host environment.
here I tried
docker exec -it postgres ...
-3
votes
0
answers
39
views
How to implement data forward fill in TimescaleDB?
TimescaleDB version:2.21.3
PostgreSQL version: 17.6
I created a hypertable using the following SQL statement.
CREATE TABLE device_telemetry_test (
ts TIMESTAMPTZ NOT NULL,
...
0
votes
1
answer
56
views
SQLAlchemy and partitioning table [closed]
I have tables which are already in Postgres and partitioned. How can I write a query with partioned birth_year
stmt = select(UserOrm)
session.execute(stmt)`
1
vote
2
answers
92
views
CREATE OR REPLACE FUNCTION in concurrently running transactions
How does create or replace function in PostgreSQL 14 behave with respect to transactions? If there are multiple concurrent transactions running at read committed isolation level, and trying to create ...
0
votes
0
answers
62
views
Flyway migration unable to create relation (table) when attempting to add table to Java API [closed]
I am working on a Java Spring API where I need to create new relations (tables) that will be stored in a PostgreSQL database.
I am creating new tables that add a new column to the existing tables with ...
-3
votes
0
answers
82
views
Error in PostgreSQL when running Rails and PostgreSQL using Docker Compose
When I run the command on docker container backend:
psql -h localhost -p 5432 -U postgres
I receive the following error:
psql: error: connection to server at "localhost" (::1), port 5432 ...
1
vote
2
answers
101
views
Frequent update of records in database
I’m building a real-time chat application using NestJS, Postgresql (Main DB), Redis and Socket.IO.
My database schema (simplified) looks like this:
-- Chats
table chats (
id serial primary key,
...
1
vote
0
answers
103
views
Large joins between three tables in Postgres and potential improvement
Below is my postgres db settings:
VERSION: PostgreSQL 15.14 on x86_64-pc-linux-gnu, compiled by Debian clang version 12.0.1, 64-bit'.
SHOW work_mem: 4MB
Now suppose I have three tables below in ...
-1
votes
0
answers
30
views
Supabase upsert in React Native profile table not updating onboarding_completed
I'm building a mobile app with React Native (Expo) and using Supabase for authentication and user profiles.
This is my profiles table
create table public.profiles (
id uuid primary key references ...
1
vote
1
answer
443
views
Stuck with Prisma error after updating to v7
I was working with Prisma and NestJS and it is fine but when I updated Prisma to version 7 I started getting errors, fixed them, but I am stuck with this one.
Part of schema:
datasource db {
...
0
votes
1
answer
37
views
Supabase RLS: Anonymous INSERT into reviews returns 401 while authenticated INSERT works (campaign_id active, policies correct)
I’m facing a strange Supabase RLS issue that I can’t resolve after days of debugging.
I have a public review flow:
Users should be able to submit reviews without logging in (anonymous users) and also ...
Advice
1
vote
1
replies
50
views
How do I make an authenticated request from my Next.js API on Supabase with RLS enabled?
In my case, I only want authenticated users to perform a SELECT query on my database, so I set up my RLS Policy for this scenario. This is where I am hitting an issue. With RLS enabled, I need to let ...