Category "postgresql"

How to install PostGIS on Oracle Linux 6.4 x64?

I am reading the following guide http://www.postgresonline.com/journal/archives/329-An-almost-idiots-guide-to-install-PostgreSQL-9.3,-PostGIS-2.1-and-pgRouting-

How do I run Prisma migrations in a Dockerized GraphQL + Postgres setup?

I'm new to using Prisma as well as Dockerizing my setup. I would like to specify my data model using Prisma, have Postgres as my database and use that in a Grap

error: ALTER TYPE ... ADD cannot run inside a transaction block

I am trying to add new type value to my existing types in PostgreSQL. But I get the following error error: ALTER TYPE ... ADD cannot run inside a transactio

Backup/Restore a dockerized PostgreSQL database

I'm trying to backup/restore a PostgreSQL database as is explained on the Docker website, but the data is not restored. The volumes used by the database image

ARRAY_AGG() grouped by another column's values

Here's my table like below p_no type name value ------------------------ 1 A Tomy 1 1 A Nick 2 1 B Tomy 3 1 B Nick 4 1

BigQuery insert values AS, assume nulls for missing columns

Imagine there is a table with 1000 columns. I want to add a row with values for 20 columns and assume NULLs for the rest. INSERT VALUES syntax can be used for t

psycopg2.errors.UndefinedTable: relation "libman_classbooks" does not exist

I had mistakenly deleted my migration folders for all my apps in my project. I therefore had to redo makemigrations and migrate for each of those apps. When th

Connecting Heroku Database to SQLAlchemy

so as part of a Web Programming MOOC, I have to connect to a PostgreSQL Database hosted on Heroku using Python and SQLalchemy. I have spent a lot of hours tryin

Default password for my user in postgresql

I installed postgresql on my Mac through homebrew. It said it didn't create a postgres account, but is using an account with my username instead. However, runni

Cannot connect to Postgres server running through brew services

I've been looking for a solution for this and could not find a working solution. I've installed postgres using brew (brew install postgres) in my MacBook and

Change sequelize timezone

I want to make restful app in nodejs Server: centos 7 64x Database: postgresql Additional: express, sequelize Table: datetime with timezone When I selecting r

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