178,983 questions
Advice
0 votes
0 replies
24 views
ordering whole query by the field of multiset in jooq
in spring boot, i wanna have nested records, because if that i need to use multiset in my selects. then i need to order the whole query by fields in my multiset. but the problem is that i get a error ...
0 votes
0 answers
78 views
How to use index in simple select
Table has index on name column: CREATE TABLE firma2.klient ( kood character(12) primary key, nimi character(100), ... ); CREATE INDEX IF NOT EXISTS ...
0 votes
1 answer
75 views
How to call Postgres function from .NET?
I tried this code: CREATE OR REPLACE FUNCTION public.t4(in iid int, OUT n1 text, OUT n2 text) LANGUAGE plpgsql AS $function$ BEGIN SELECT DISTINCT n1=l.name, n2=l.comment from ...
Tooling
0 votes
1 replies
23 views
How to write test code for Prisma version 7
For testing Prisma, I used prismock or prisma-mock . But those packages are compatible with Prisma version 6 or earlier. I visit the Prisma Official website, and they are suggesting using jest-mock-...
0 votes
0 answers
31 views
Connection to remote PostgreSQL server with hashtag in password with node-postgres
I have a password for a remote PostgreSQL server that I cannot change. This password contains hashtags (#). From searching, I know that this can be a problem. I can connect to the server from the ...
Advice
1 vote
3 replies
42 views
Determine Connectedness Components for a Graph with a RECURSIVE Cte
I have a graph given by 2-element sets of points, say in a table CREATE TABLE edge_set ( INTEGER edge_set_id, INTEGER point_id ) I want to determine the graphs connectedness components. These ...
0 votes
1 answer
47 views
What is the practical difference between static and dynamic background workers in PostgreSQL?
I’m trying to understand when to use a static background worker vs a dynamic one in PostgreSQL. From what I know so far: Static workers are registered during postmaster startup Dynamic workers can be ...
Advice
0 votes
3 replies
59 views
PostgreSQL: primary key based on timestamp
I am working on a highload system, which needs to process quite a lot of events, but not an insanely huge amount. The data ingested has to be editable during a short period of time, and then the need ...
1 vote
0 answers
42 views
Error when mapping a list of enums in EF Core to PostgeSQL array
I have a class with a collection of enums mapped into PostgreSQL native enum: internal class EventStackFilter { // other properties omitted public List<EventStackEventStatus> Statuses { ...
2 votes
2 answers
106 views
Find maximal subsets
I have sets identified by a set_id, say: CREATE TABLE sets ( INTEGER set_id, INTEGER element_id ); I need a SELECT statement that finds the sets that are maximal with respect to the subset ...
Best practices
0 votes
1 replies
35 views
How to run Production PostgreSQL on a VPS (Hetzner/Digital Ocean,etc) - best practices etc?
I am getting into the world of self-hosted applications and I am trying to run a Production PostgreSQL on a VPS - Hetzner. So far I have been using AWS RDS and everything has been working great - ...
0 votes
0 answers
25 views
cloudsql gcp PGAUDIT
I activated pgaudit on my Cloud SQL instance by adding the two flags enable and pgaudit.log, and I immediately saw audit logs in Cloud Logging without having to create the extension. When I connect to ...
-2 votes
0 answers
36 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
32 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
49 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: [ "...