Category "postgresql"

Django constraints when removing columns in manual migrations

Django silently removes constraints when removing columns, then arbitrarily chooses to include them in migrations. I've encountered an odd bug(?) in Django in o

Django + Postgres: OperationalError FATAL: sorry, too many clients already (as a result of a deliberate attack)

There are many similar questions on Stackoverflow but they do not address my particular case. The problem is that there are deliberate attacks on the website wi

Reading incremental results from stored procedure

I am working on a stored procedure that will perform time consuming query (> 30 seconds) inside the engine (arrays, temp tables, ...). The stored procedure r

What does citext NULL mean in PostgresSQL

What does this mean in PostgreSQL columnName citext NULL Im working on some SQL change, there is data in the database, but doesn't show in the front end. Wonder

Rails Order by model method

How can I use the model method in scope for ordering? I have to order the users list, users who have failed go in the last. scope :position_ordered, -> { ord

Converting SQL Server DataRequest class to NpgSQL

Trying to convert a SQL Server DataRequest class for use with PostgreSQL. Stuck on the DBTypes in this code. Can anyone give me a hand in this conversion? /// &

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

spring boot transactional integration for event management

We have recently put a REST Spring Boot MVC application into production. We are using JPA with Postgresql in order to achieve some nonfunctional requirements: w

postgresql function to process partitions separately

I have multiple loosely connected tables, all partitioned the same way by the same key: create table owner( user_id uuid primary key, owned_thing int ) partitio

How are months intervals internally calculated in Postgres?

In PostgreSQL, the interval of '1 month' sometimes counts as 30 days and sometimes counts as 31 days. What are the criteria used to determine this? I ran the be

How to use passed schema name dynamically in a function?

I have function called list_customers, taking i_entity_id, i_finyear as input params. The schema name is built from i_finyear, I need to execute the query based

How to use passed schema name dynamically in a function?

I have function called list_customers, taking i_entity_id, i_finyear as input params. The schema name is built from i_finyear, I need to execute the query based

knex with pg_column_size in the returning function

Knex: 0.95.12 Database: PostgreSQL 11.7 OS: Debian GNU/Linux 9 (stretch) (official Docker image) Node: v12.22.6 Is it possible for knex to return the results of

How to create relationship between two tables using feathersjs, sequelize and postgresql

I have two models users.model.js and swing-trades.model.js when I am creating a relationship between these two models and running feathersjs using npm run dev`,

How to fix problems in docker postgres connection?

Tried to raise docker postres + docker flask. Neither of them was raised! I read some guides and watch videos about postgres and flask in docker, but stil can't

Counts for time range per day

I have a table something like this create table widgets ( id primary key, created_at timestamp, -- other fields ) Now I want a query that shows the co

Subdirectory of PV directory isn't mounted to persistent volume

I've got a PV that is backed by do-block-storage, and it's mounted to a stateful set, at /var/lib/postgresql, this is the full stateful set: apiVersion: apps/v1

how to use postgres.db.name for multiple databases in kubernetes configMaps

So I want to create multiple postgresql databases in the kubernetes deployment. I tried with the below configMaps configuration but the databases are not being

PostgreSQL DB location query with Fluent 4

I have an application that stores items with a latitude and longitude, I wanted to create a query that filters the items and paginates them by their distance to

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory

Not really sure what caused this but most likely exiting the terminal while my rails server which was connected to PostgreSQL database was closed (not a good pr