Category "postgresql"

Entity Framework Long Timeout on Queries from Azure PostgresSQL DB

I am having an issue with excessivly long timeouts with calls to an Azure PostgresSQL server. On rare occasions, the call to the database will take approximate

Could not translate host name "db" to address using Postgres, Docker Compose and Psycopg2

In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml. base.py: import psycopg2 conn = psycopg2.connect("dbname='base123' user='postgres'

Connect to existing instance of Postgresql from WSL 2

I'm running Ubuntu WSL 2 on Windows 10. Before I installed WSL I already had Postgresql installed on my Windows 10. I wanted to connect to the database from WSL

Find rows with multiple duplicate fields with Active Record, Rails & Postgres

What is the best way to find records with duplicate values across multiple columns using Postgres, and Activerecord? I found this solution here: User.find(:al

Docker & Postgres: Failed to bind tcp 0.0.0.0:5432 address already in use

Problem I'm trying to start postgres in a docker container on my Mac, but I keep getting the following error message docker: Error response from daemon: driver

PostgreSQL backup in custom format ( -F c) fails during pg_restore ( copy command in log )

We have a PostgreSQL custom format ( -F c ) database backup ~1Gb in size that could not be restored on two of our users machines. The error that occurs is :pg_

How to use postgres database when generate jooq by LiquibaseDatabase

There is pretty good guide how to use code generation from liquibase However by default it uses h2 database to create schema from migrations and then generate r

How to install PgBouncer on Windows 7 (x64)

I am attempting to install PgBouncer on my computer with no success. In the installation page, im told that PgBouncer has two dependencies GNU Make 3.81+ and

Update a PostgreSQL field from the content of a file

I have a file containing a value which should go into a field of a PostgreSQL table. By searching a little, I found many answers, e.g. How can I update column v

How to install PgBouncer on Windows 7 (x64)

I am attempting to install PgBouncer on my computer with no success. In the installation page, im told that PgBouncer has two dependencies GNU Make 3.81+ and

pg_dump fails with error: `FATAL: role "username" does not exist`

I have a db named backupdb, I want to import this to my local rails app so I want to take a dump of it. When I am running pg_dump backupdb, I am getting below

Postgresql ERROR: cannot drop columns from view

I'm new to postgresql. Can anyone suggest the reason and solution to this error? However it works if I select an extra sum(s.length) but i don't won't this in m

PostgreSQL: encoding problems on Windows when using psql command line utility

I'm working in a centralized monitoring system on Windows 2008 R2, I have installed a PostgreSQL 9.3 to use psql from the command line. When I try to access to

How to configurate the home client in dbeaver for Postgresql

I'm am tryng to import a database, however i'm getting this message : Client home is not specified for connection I guess that i have to configurate the clien

How to get the latest message in each conversation of a certain user in SQL?

I need to write a query that returns the latest message in a conversation between two users. I've included the schema and my (failed) attempts in this fiddle: h

Django model doesn't get saved to database inside Celery Task

I've hit a really nasty situation. I have the following setup. I have a django model representing an FSM with a django FSM field I have a celery task that sen

Gorm and Gin error 500 only when Updating

I've a pretty simple CRUD for a Task list, and so far I'm able to Create, List all, List by ID and Delete records, bu when I try to update, it gives me the foll

Declare variable set = select

How do I declare a variable for used in a PostgreSQL 9.3 query? CREATE or replace FUNCTION public.test() returns int4 AS $BODY$ DECLARE cod_process bi

Power BI - Data Load Error- OLE DB or ODBC error: [DataSource.Error] PostgreSQL: Exception while reading from stream

My question might look similar to some earlier posts but none of the solution has answered what is the rootcause of this behavior. I would try to explain what I

The right way to DI NpgsqlConnection postgreSQL with multiple connectionString in ASP.NET Core 3.1

I'm struggling to register DI NpgsqlConnection() with multiple connection strings in ASP.NET Core 3.1, Dapper v2.0.78 & Postgres v11. I will provide the cur