Category "postgresql"

Generate random pairs SQL

Suppose we have these two tables. TABLE1: |column_1 | ... | -------------------- | 'a' | ... | | 'b' | ... | | 'c' | ... | |

Read Array at index in jpa Query

I have a native Query that return a list of objects, i need to pass an array as parameter to the function getAllUsers. @Repository public interface UserReposito

SQL Some vertical to horizontal field names/values

What I've read here doesn't quite answer what I'm trying to do. That's why I'm posting a request here and I'm confident to learn what I can do on this subject.

Old problem PHP still not resolved. PDO pgsql is slower than pg functions

i fight with same issue as described here: Slow connection PHP PDO Postgres but not MySQL here's the thing - PDO Postgresql connections seem to be really slow

How to create ERD from Heroku PostgreSQL database?

I would like to create ERD from my Heroku PostgreSQL database? How can I generate ERD? Is there any external tool that will help with this? Can you use Dbeaver

Supabase: Filter data with join and logical 'OR'

I'm using Supabase as a database and trying to implement a full-text search. My example setup is quite simple, I have two tables: items +----+-----------+------

Spring boot docker container is running, but cannot access via localhost/browser

I have tried to search other questions, but the solutions arent cutting it. I have a java spring boot application running inside docker, using the command below

How to create ERD from Heroku PostgreSQL database?

I would like to create ERD from my Heroku PostgreSQL database? How can I generate ERD? Is there any external tool that will help with this? Can you use Dbeaver

Metabase Custom Column Casting from Text to Integer

How can I use Custom Column feature in Metabase to cast column from Text to Integer for sum calculation.

Pgadmin server is empty

I have recently installed PostgresSQL and my servers are just empty. I am sure I should have servers under servers and a database to play with but I have nothin

Expression {{current_username()}} is not being read properly by Superset row level security with Postgres

I have been trying to add Row Level Security to Superset and I have written this clause: when I hard code this clause in a select on the database it works as i

Prisma, update scalarList/array

I´m doing an Spotify clone and I´m trying to add a song to a playlist but my query doesn't work, until this point, everything was good following the

Enable logging in postgresql using docker-compose

I am using Postgres as a service in my docker-compose file. I want logging to log file to be enabled when I do docker-compose up. One way to enable logging is b

How to listen for new records in database with Sequelize?

I have a PostgreSQL database with Sequelize ORM and I want to listen for new entries. How should I do? Should I use Sequelize afterCreate hook? Can someone help

Store JSON array as TEXT array in INSERT INTO Postgres statement

Before, I had the following table schema. CREATE TABLE cities ( "city_id" BIGSERIAL PRIMARY KEY, "city_name" TEXT NOT NULL UNIQUE, "employees_names"

Listing tables USED BY materialized view in PostgreSQL?

I've googled for it, both couldn't find an answer. How can I list tables used by materialized view (must not use the information_schema views) in PostgreSQL? Th

Postgresql argument placeholder in jsonpath expression

I try to pass argument $1 to jsonpath-expression: SELECT 1 FROM %s.orders AS O WHERE order_info @? '$.items[*] ? (@.ProductID == $1)' but it doesn't work. P

Postgresql database autoscaling in GCP

I have an app that spikes postgresql queries at morning 70% CPU usage, and has very few the rest of the day less than 20% usage. I want this machine to autoscal

Update a table with its relations in TypeOrm

We have: Postgres Database Photo: import {Entity, PrimaryGeneratedColumn, Column, ManyToOne} from "typeorm"; import {User} from "./User"; @Entity() export clas

NestJS app build with docker can't access postgres database in the same docker network: ECONNREFUSED 127.0.0.1:5432

I want to run my app on my local machine within Docker. I don't want to optimize the size of my docker app or build it for production now. Docker builds my back