Category "postgresql"

Indexes not working after Postgresql Upgrade (10.18 -> 11.14)

Solved: Doing a vacuum on all of the old tables resolved the index issues. Autovacuum was never going to happen because they were all static. Simplest query tha

insert or update on table "django_admin_log" violates foreign key constraint

Trying to save a post on a django project I got this error The above exception (insert or update on table "django_admin_log" violates foreign key constraint "dj

PostgreSQL C function to get values

I am trying to write a PostgreSQL function in C. My goal is finding minimum value of a list. So, my function will be executed like these: SELECT min_to_max(val)

PostgreSQL 13 - Performance Improvement to delete large table data

I am using PostgreSQL 13 and has intermediate level experience with PostgreSQL. I have a table named tbl_employee. it stores employee details for number of cust

Find first record of multiple values in single query

Table timestamp | tracker_id | position ----------------------------------+------------+---------- 2020-02-01 21:53:45.571429+05:30 |

Turn postgres date representation into ISO 8601 string

I'm trying to format a Postgres date representation into a ISO 8601 string. I'm assuming that there is a Postgres function that can do it, but I found the docum

I am unable to install PostgreSQL 12 on Red Hat 8.1 after following official instructions using dnf

Official Instructions I have been trying to install PostgreSQL 12 but I get the following error: No match for argument: postgresql12 Error: Unable to find a mat

union all in SQL (Postgres) mess the order

I have a query which is order by date , there is the query I have simplified it a bit but basically is : select * from (select start_date, to_char(end_date,

Sequelize ARRAY Datatype for PostgreSQL

I'm trying to use the ARRAY datatype for Sequelize (Node.js SQL ORM) with PostgreSQL. However I'm not exactly sure how to utilize it. I know how to set it on th

Postgres OVERLAPS date function in TypeORM

I want to transfer the query to TypeORM. It looks like this in Postgres SELECT * from equipment_charging where (equipment_charging."start_date"::date, equipme

How to use TypeScript with Sequelize

I already have my server application written in Node, PostgreSQL, Sequelize using Fastify. Now I would like to use TypeScript. Can anyone tell me how to begin

Problem with Creation form (Simpleform) PG::NotNullViolation: ERROR: null value in column with Rails

Hello i have an issue with my app Rails when i try to create an "Enfant" who belongs to an user and a Nounou but my problem is when i create an "enfant" i'm a u

Postgresql/Docker - password authentication failed for user "user"

I have set database with postgresql and docker, now when I want to access to my database I have this connection error saying password authentication failed for

How to return a jsonb object from a PostgreSQL c extension function?

How can I return a simple jsonb object in a PostgreSQL function written in C? I don't know enough about postgres server side programming. And below is my attem

Helpme please query about postgres

I need to extract a number of characters from one column to another and insert it into another column number_operation communication test B003-00000005 FCI-

How to use the clone function in pg-mem?

I'm trying to use pg-mem with the pg-promise adapter for testing my database layer. Initially I've tried fetching a fresh database for each test: import { newDb

Can't see tables in PostgreSQL

I've created a schema in my PostgreSQL database that Hibernate uses, creating tables, persisting entities and so on. After I updated my Ubuntu 14.04 to 16.04, I

How to register pg-promise with hapi

I try to register pg-promise as hapi plugin. However, the following error occurred. TypeError: Cannot read properties of undefined (reading 'name') at interna

Why autovacuum is not running

If the parameter autovacuum is on, and the parameter track_counts is on also - why it's look like the autovacuum has never worked? select relname,last_vacuum,

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