Skip to main content
0 votes
0 answers
23 views

Using the PostgreSQL-specific slick-pg extension of slick, which supports multi-upsert. Let's consider a small example. CREATE TABLE foo (id INT PRIMARY KEY, name TEXT DEFAULT 'foo'); The ...
silverberry's user avatar
1 vote
0 answers
45 views

I have few node microservices connected to single postgres db. I also have an elixir service for realtime message passing between BE and FE. I am now enhancing realtime service with some additional ...
Abhinav Kulshreshtha's user avatar
-2 votes
0 answers
50 views

UPDATE 1: I searched in the codebase and I am seeing in the below files, can you please let me know where to update, since I am a beginner not sure where to update the port 5432, providing the image ...
user1365117's user avatar
Best practices
2 votes
4 replies
112 views

Relatively new to SQL and want to learn best practices for "safe" queries. If I have queries like "SELECT {cols} FROM {table} WHERE {condition}" or SELECT {cols} FROM ...
Frontline's user avatar
0 votes
1 answer
120 views

In an application cleanup job, I need to remove all rows from a table regularly. Table: CREATE TABLE session_logs ( id BIGSERIAL PRIMARY KEY, session_id TEXT, created_at TIMESTAMPTZ, ...
Imtiaz Ghous's user avatar
13 votes
3 answers
674 views

I'm debugging a performance regression in an application that uses prepared statements against PostgreSQL 15. I have a table with skewed data distribution: CREATE TABLE invoice_events ( id ...
Imtiaz Ghous's user avatar
Advice
0 votes
1 replies
55 views

As an action of our last test my company implemented log_replication_commands to 'log all replication commands that are executed in your database cluster to ensure the data is not off-loaded to an ...
Krishnp92's user avatar
3 votes
1 answer
98 views

After upgrading to PostgreSQL 18, pgoutput no longer sends BEGIN/COMMIT for transactions that touch only tables outside the publication. This is by design (see related question). Our replication slot'...
valerii's user avatar
  • 67
2 votes
1 answer
66 views

So I have a "user" composite type in Postgres: CREATE TYPE "user" AS ( username varchar(20), password text ); Used to have a field CREATE TABLE foo ( ... users ...
revsuine's user avatar
Best practices
13 votes
12 replies
2k views

I built a small relational database as a personal learning project. It is around 10,000 lines of code and already includes many of the core parts of a basic relational database, such as page-based ...
凉宫春日's user avatar
-8 votes
0 answers
154 views

[enter image description here][1] I have been trying to connect my Supabase to my cursor project and for that I ran the SQL code shown below in the SQL editor of Supabase. My code from cursor: -- ...
Dev King's user avatar
-1 votes
0 answers
24 views

I have a set of 4 servers that currently have PostgreSQL v16, one of them works as master, the other 3 as slave. I am trying to add a 5th server that ideally runs PostgreSQL v17. I tried to use ...
Zhiyong Li's user avatar
Best practices
2 votes
7 replies
123 views

I'm calling a function with "paired" arguments: WITH ts AS ( SELECT t.c1, t.c2 FROM t ) -- `ORDER BY` to guarantee the same order SELECT f( a => ARRAY( SELECT ts.c1 FROM ts ...
Kuraga's user avatar
  • 435
Best practices
0 votes
0 replies
55 views

I have an audit table using a TimescaleDB hypertable: CREATE TABLE log.data ( modified timestamptz not null default clock_timestamp(), table_schema text not null, table_name text not ...
user31549280's user avatar
0 votes
1 answer
129 views

I'm creating a function in Postgresql to bring data based on the user's name, but when I don't pass a name in the argument it should bring all the appointments independent of the name, but I'm getting ...
Ian Leme's user avatar

15 30 50 per page
1
2 3 4 5
11931