Category "postgresql"

Using Docker to launch web app, can't connect to Postgresql DB?

I received the following error when trying to write session data using Tomcat's PersistentManager to a Postgres DB running on my local machine: SEVERE: A SQL

Rails SQL "select in" across several columns: where (code1, code2) in (("A", 1), ("A", 3), ("Q", 9))

I have a business requirement to select records based on two fields in one table: code1 and code2. The selection is complex and hard-coded, with no codeable rhy

docker-compose with multiple postgres databases from sql dumps

I know this may seem like a duplicate of docker-compose with multiple databases, but I still can't manage to get it working after going through the answers. He

CteInsertStrategy can only be used with Dialects that support CTE that can take UPDATE or DELETE statements as well

Hibernate 6.0.1 with PostgreSQL JDBC driver 42.3.5 causes the following exception: java.lang.UnsupportedOperationException: CteInsertStrategy can only be used w

Node postgres ECONNREFUSED in localhost

This issue is totally driving me insane. I spent months with this, trying to make a SIMPLE NODE APP WORK. I finally managed to make an APP work in a nice server

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres" (Ubuntu)

When I try to open psql with this command: psql -U postgres I get this error: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" f

Connect Django with Azure PostgreSQL using managed identity in azure

How can I configure Azure PostgreSQL database in Django settings.py using Managed Identity in Azure?

Scan from Postgres into struct with pointers

What would be the benefit of using a struct like below with pointers instead of a struct without pointers when scanning from database? type User struct {

Cannot deploy the ktor server

What kind of problem is that? Does anybody face this? Or anyone knows the solution? I was trying to deploy ktor server using PostgreSQL. Exception in thread "ma

Connect to Postgres from Swift

In a Swift app, how does one connect to a Postgres database server? In Java, we use JDBC with an compliant driver to connect to a Postgres server, communicate

postgresql show month start date and end date based on given dates

I need to pull out first date and last date of the month from the given from_date and to_date as input, For Example:- I have my psql output table as the followi

Django/Docker/Postgresql: app connected to the 'wrong' database

I have develop a project with Django/Docker/Postgresql and use docker-compose to deploy on a linux remote server. I want to deploy 2 apps based on the same code

How to use to_jsonb as row_to_jsonb? Where the details about "how much"?

I was testing some queries at pg9.4 in "JSON mode", and now I am checking if pg9.5 will bring all same JSONB functionality... But there are no row_to_jsonb() fu

Calculating Percentage value for a Group by value in Postgres

I want to calculate Percentage of a value in Group by. My Table data salesId salesAmount productName salesTyp ------- ----------- ----------- ----

cant create a database in DBeaver

im just starting using databases and I'm working with PostgreSQL using Dbeaver. When I want to create database,i need to create a new connection ,so I select Po

Parse postgres URL

I'm trying to parse postgres db credentials, the format is as follows: postgres://usernname:password@hostaddress:port/databasename I'm calling a method which r

Which Postgresql WAL files can I safely remove from the WAL archive folder

Current situation So I have WAL archiving set up to an independent internal harddrive on a data logging computer running Postgres. The harddrive containing the

get time for timezone

I'm hurting my head again this : On postgresql, I would like to get the local time for a given timezone. So, at 15:45 GMT, I want 16:45 for +01:00, but I can't

BeanCreationException: Error creating bean with name 'flywayInitializer'

I am trying to run my project tests in a docker container. All of the tests work just fine when running locally. Errors started occurring when I tried to move m

PostgreSQL left join query object array aggregate

I have 2 tables: table "person" with columns: person_id, person_name table "pet" with columns: pet_id, owner_id, pet_name person data: 1, 'John' 2, 'Jill' 3,