"ERROR: could not load library "C:/Program Files/PostgreSQL/14/lib/plpython3.dll": The specified module could not be found." plpython3u Windows 10

When ever I try to create extension plpython3u ERROR: could not load library "C:/Program Files/PostgreSQL/14/lib/plpython3.dll": The specified module could not be found. This message shows up I can't add extension. I am running my Postg

Continue reading →

Food delivery database schema

Is there any suggestion for food delivery application database schema like 'Wolt'? It is important to know how they keep country details, restaurants data like menu items and their translations, menu items ingredients and their translati

Continue reading →

Postgres composite / user defined types in Apache NiFi

I have successfully worked with postgres enum in Apache NiFi 1.24 but I can't read or write columns defined as composite types. I have used standard jdbc postgres driver and also pgjdbc-ng driver but it did not help. I also tried to defi

Continue reading →

Setting up pytest django database

I need to run this SQL after the test database is created but before creating any tables: `CREATE EXTENSION pg_trgm; CREATE EXTENSION btree_gin; I know that I can somehow use django_db_setup fixture to do this but I can't figure out how.

Continue reading →

Strapi - Migrating From sqlite to postgres

I have a strapi project that I have created and developed on sqlite. I however need to migrate it to Postgres db for production. I am getting an error of conflicting keys. I could recreate the project with postgres DB but, if I get assis

Continue reading →

Postgresql Return Whether Upsert Query INSERTed a New Row or UPDATEd one

I want to know if an upsert/"on conflict do update" query inserted a new row or only updated one. There is a few ways that kind of work but they don't feel correct Here is my current query: INSERT INTO mytable (id, mycolumn) VALUES (123,

Continue reading →

Postgres query taking a long time when counting

I've got an index for a table in Postgres, and trying to speed up a query to count elements. Simplified, this is the table and index: CREATE TABLE A ( id uuid, deployment_id uuid, started_at

Continue reading →

Convert Dynamic SQL Server T-SQL to Dynamic PostgreSQL PL/SQL

I wrote the SQL Server sproc usp_getrowcounts, shown below, that dynamically gets a row count from each table, as tables come and go, and need the equivalent dynamically generated and executed PL/SQL to work in PostgreSQL, however workin

Continue reading →

Python SQLAlchemy - No Database Connection When Run From Separate Module

I am new to sqlalchemy and have an issue connecting to the database when trying to run a script from a separate module. For conext I am trying to connect to a database and return the information as a panda. This works fine when I have th

Continue reading →

Javascript/NodeJS order of execution of code

I am working on a full stack project that uses NodeJS for the backend and I have the following code: const express = require("express"); const app = express(); const pool = require("./db"); pool.connect((err, client, done) => { if (er

Continue reading →