Category "postgresql"

Python Postgres Package: psycopg2 copy_from vs copy_expert

Requirement: To load millions of rows into a table from S3 using Python and avoid memory issue I see there are two methods psycopg2's copy_from and copy_expert

How to create Dataframe form presto db table of Array Data type column using spark

I am trying to create spark Dataframe from presto db table which has few columns as Array DataType. I tried multiple ways but I am getting same exception java.s

Compare date filed with month and year in Postgres

I have a date field in one of my tables and the column name is from_dt. Now I have to compare a month and year combination against this from_dt field and check

Can't connect to Postgres from Django using a connection service file (on Windows)

[NOTE: This is using Django 4.0.2, Python 3.8.2, and Postgres 14.2.] I have successfully set up Django and Postgres, and I can get them to work together when I

Is it possible to copy an enum type from one schema to another

I'm using postgREST to generate a http accessible api (great stuff). There is a little bug that I'm trying to work around. For whatever reason, when calling a

How can I migrate data from one PostgreSQL database to another (with slightly different table/column names)?

I am trying to migrate a large portion of one postgres database to another postgres database that has a slightly different layout/table names/column names. But

Postgresql in a Docker Container on Windows: How to persist data to a local windows folder

I'm trying to run postgres in a docker container on windows. I also want keep the data in a windows folder, so I tried this: mkdir c:\pgdata PS > docker r

Fix ERROR: "operator does not exist: timestamp without time zone > integer" error

Im trying to migrate queries from Google big query to postgresql, and Im getting this error ERROR: operator does not exist: timestamp without time zone >

How to INSERT now() + INTERVAL in Postgres 9.x

I'm trying to INSERT a future date into a timestamp with time zone column in a table in Postgres 9.6.2. I'd like this date to be the current transaction time pl

How to INSERT now() + INTERVAL in Postgres 9.x

I'm trying to INSERT a future date into a timestamp with time zone column in a table in Postgres 9.6.2. I'd like this date to be the current transaction time pl

HikariPool-1 - Exception during pool initialization

I'm deploying Spring-Boot4 project and I have got an error called HikariPool-1 - Exception during pool initialization. 2019-07-05 11:29:43.600 INFO 5084 --- [

PostgreSQL internals: Why is COUNT slow?

Why does the time complexity of COUNT in postgresql (v9.6) appear to be as bad as it could get? The following demonstrates that even without my machine under re

Keep PostgreSQL (FDW) Foreign Schema In-Sync

Using Postgres 9.6 with postgres_fdw extension, there any means to keep the tables present within the local schema in-sync with the tables on the remote databas

How to change PostgreSQL 12 crash dump location path?

We are using Postgres 12 (TimescaleDB) and managing it through Patroni. There was some unexpected issue that happened and crash dump written in the default loca

How to deserialize BigDecimal value received from kafka broker through debezium CDC mechanism?

I have a couple of microservices developed using spring boot and each has its own Postgres database. These microservices exchange data with a CDC mechanism prov

Stop and Resume pglogical Replication -PostgreSQL 12

I wanted to check if there is a way to stop and resume PostgreSQL replication using pglogical? For some reason, if either the publisher or subscriber needs to r

why does postgres set_config's is_local = true not persist the variable for the whole transaction?

I have a function that uses set_config with is_local = true to set a variable. Now I expected that a select statement using the variable with current_settings w

How to set schema with node-postgres

I'm trying to query against a schema called DOCUMENT in my postgres db using node-postgres. I can't seem to get a query to run against the specified schema. T

when running tests in django and PostgreSQL DB can't create database

I'm having a problem with running unit tests in django while using ElephantSQL, when running command python manage.py runserver everything works just fine, I'm

initb fails for brew postgresql-upgrade-database

I am using brew postgresql-upgrade-database to upgrade postgresql from 11.8 to 12 and migrate the data. The process failed with the following output Upgrading