Category "postgresql"

Delete duplicates from a huge table in Postgresql

I have an unusual problem: I need to delete duplicate records from a table in Postgresql. As i have duplicate records so i dont have primary key and unique inde

How can I fetch a NULL boolean from Postgres in Go?

Go's zero value for a bool type is false. Postgres supports an undefined BOOL type, represented as NULL. This leads to problems when trying to fetch a BOOL val

How to Go/Gorm a megamenu?

I'm writing an e-commerce app in Go, and I've been stuck on the megamenu for a while now, trying to implement it with PostgreSQL tables. The end result, JSON re

I am looking for a replacement for pgsync. Looks like the library is not supported anymore. How to sync between postgresql and elasticsearch?

Someone from the backend development side, please help with the below. we have a site driven by Postgres. We also have a elastic search implementation to make f

How to select tables under replication in Postgres or List databases under replication in Postgres

I am having 3 Node Postgres cluster and want to know tables/databases which are under logical replication. The issue I am facing is when the leader/master node

JBPM Business central - Data set not working with aggregate function

I have an issue with the Data set - Execution server. I am using PostgreSQL as DB. I want to calculate the difference between the two dates column for my report

PostgreSQL timezone takes Windows OS timezone automatically

While installing Postgresql DB 13.0-1 x64 on Windows, if I comment the "timezone" key on postgresql.conf file then "show timezone" sql query gives me "GMT". How

How to export table data from PostgreSQL (pgAdmin) to CSV file?

I am using pgAdmin version 4.3 and i want to export one table data to CSV file. I used this query COPY (select * from product_template) TO 'D:\Product_template

How to export table data from PostgreSQL (pgAdmin) to CSV file?

I am using pgAdmin version 4.3 and i want to export one table data to CSV file. I used this query COPY (select * from product_template) TO 'D:\Product_template

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