All Questions
Tagged with database postgresql
10,718
questions
0
votes
0
answers
7
views
How to Properly Create the Data Architecture for a PERN Stack Application?
I'm building a web application using the PERN stack, and I'm looking for best practices on how to design the data architecture.
I just did a basic pernTODO in order to practice my postgressSQL skill a ...
0
votes
1
answer
20
views
Not able to connect to foreign server
I am getting following error on PostgreSQL:
SQL Error [08001]: ERROR: could not connect to server "regionaldb_server"
Detail: connection to server at "localhost" (127.0.0.1), ...
0
votes
1
answer
41
views
Selecting Rows By Specific Column Data in PostgreSQL
I'm trying to build a recipe finder app (PERN stack) like SuperCook but I ran into some problems with my postgres table.
Short description of the desired result. I'd like the user to select some ...
-1
votes
0
answers
31
views
How to Create Triggers Between Two Databases
In my system, I have a machine on AWS with several databases. My goal is to create some triggers/scripts that continuously read from some databases and, based on the information read, generate or not ...
0
votes
1
answer
22
views
How to return JSON objects without explicit aliasing in postgresql
If I have two tables and I join them, can I return one of the values a JSON object, without having to specify all the fields?
For example, the following works:
SELECT u.*,
json_build_object(
'name', ...
0
votes
0
answers
13
views
How to Upsert Nested Relations in Prisma, using connectOrCreate? connectOrCreate doesn't update deeply nested relation
I'm working on an application using Prisma ORM with a schema that includes Profile, Contact, and SocialMedia models. I need to perform an update operation on a Profile, which should also handle ...
0
votes
0
answers
24
views
PostgreSQL not using index on materialized view
I've got a materialized view which has 2 columns (patient_id BIGINT, department_ids TEXT[]).
It is a handy precomputed dataset used to filter patients who have received care in a hospital department ...
0
votes
2
answers
72
views
How To Import a Big .csv(~2GB) Into a PostgreSQL Table
I am new into databases and PostgreSQL and today I wanted to import this dataset: https://www.kaggle.com/datasets/wilmerarltstrmberg/recipe-dataset-over-2m/data into a PostgreSQL so I can make a ...
0
votes
1
answer
26
views
Postgres serializable isolation level confusion
I'm learning about database isolation levels and I'm attempting to walk through an example of when the serializable isolation level would cause concurrent transactions to error.
I have come up with ...
0
votes
0
answers
23
views
Database does not exist docker image Npgsql.PostgresException (0x80004005): 3D000: database "CatalogDb" does not exist
I am trying to connect to postgres database running on docker container from visual studio, I am sure the DB exists and here is the logs:
docker ps:
docker ps
CONTAINER ID IMAGE COMMAND ...
0
votes
0
answers
20
views
How To Insert query in Flutter with PostgreSQL new package? postgres: ^3.2.1
How To Insert query in Flutter with PostgreSQL new package? postgres: ^3.2.1
all the other documentation are old, deprecated and not working anymore, could you someone please help on this..?
How to ...
0
votes
1
answer
28
views
How to do Join on composite key with postgREST?
I am struggling to find the right syntax to perform a (nested) join on on composite foreign keys.
For example, my tables are
CREATE TABLE post (id TEXT PRIMARY KEY, userId TEXT REFERENCES user(id), ...
1
vote
0
answers
57
views
What is a good way to keep the SQL queries in a Rust application that uses sqlx?
At the moment I have my SQL queries as a multiline string in my Rust files.
let sql = r#"
SELECT
*
FROM
public.users
...
1
vote
1
answer
53
views
How do I diagnose a 38s planning time for `select *` in Postgres?
I have a table that Postgres is really struggling with planning queries on. I've been running:
explain (analyze, verbose, buffers) select * from lead
The resulting query plan (literally a seq scan) ...
0
votes
0
answers
19
views
Hibernate can't find a table from postgresql database [duplicate]
Well, I have a postgresql database and table:
Structure in postgresql
So, i want to get all records from "SheduleRecords" table using Hibernate.
Table structure:
All types are "...