Category "postgresql"

How to create a new postgresql database via ubuntu shell

I’m doing; createdb -O dan -h 127.0.1.1 -p 5432 -U dan -w testdb but it throws me: fe_sendauth: no password supplied Then I tried to remove -w and it a

Postgres TypeORM - FK to PK that is also FK to another table - constraint error

In my NestJS application with postgres db I have these 3 entities: User, Writer, Book and a class named UserBaseEntity. export class UserBaseEntity { @Prim

DELETE CASCADE in PostgreSQL extremely slow

I have a table "studies" with 14 subtables that are connected to "studies" via a foreign key that refers to the primary key in "studies". I need to delete all r

How to import database from odoo 14 to postgresql?

I am trying to take a backup from Odoo enterprise 14 through query. When I try to export the dump file I get this message Can anyone guide me, how to export all

postgresql function with list of arrays as input

I want a postgresql function that will take a list of arrays, and loop through them. I have written a "hello world" type function that takes a single array and

PostgreSQL first query slow

I implemented cursor pagination. And for first rows it works realy well but the more I scroll down, the first query I send is slower. I run this query: SELECT *

How to convert UTF8 data from PostgreSQL to AL32UTF8 Oracle DB?

I have a task to import some data from Postgres database to Oracle via dblink The connection between Postgres and Oracle works good, but unfortunately, when I t

Referencing JOIN columns within a subquery from an aggregate function

I'm trying to reference columns in JOIN tables of a subquery from an aggregate function, as follows: WITH my_activities AS (SELECT activities.*, owner.*

Django cache real-time data with DRF filtering and sorting

I'm building a web app to manage a fleet of moving vehicles. Each vehicle has a set of fixed data (like their license plate), and another set of data that gets

How can I concatenate all values in descending order that have the same primary key in HIVE?

I am using HIVE and I have a table like this: S.no ID applicant_num f_name l_name Primary Key 1 123 202201A1 akhil yadav 123~&~akhil~&~yadav 2 123 2022

How to update local data from rxdb to server database postgrasql through graphql in react

we are trying rxdb as local database and postgresql as a server database and through graphql end point we are able to push and pull data from local to server an

Full text search failure on PostgreSQL

I have a PostgreSQL used to index text content. The SearchVector column is created successfully using the following code UPDATE public."DocumentFiles" SET "Sear

how to create a user in postgres to connect to nodejs?

It is my first time using postgres and I am trying to use it with node. I installed postgres in Ubuntu and created the user admin sudo -i -u postgres createuser

error in migration with legacy database in Django

I'm working on creating a filter in django where the options displayed are coming from a new column in the database. It turns out that this column was created d

JOOQ JsonbValue in where()

Working on trying to convert the following Postgres Query into Jooq. I would love to implement this with JOOQ's features instead of just copying the SQL in. Ult

Get the list of firewall rules on a Postgres Instance in Azure return empty in a azure function

I'm trying to get the list of firewall rules on a Postgres Instance in Azure, using the azure-js-sdk. Locally it works like a charm, I've got the list of firewa

Why can't my airflow webserver initialize properly?

When I create a dummy DAG following the Apache guide to airflow in Docker and run docker-compose up, the webserver container repeatedly fails and restarts with

How to fetch data in a given interval in postgresql

SELECT time,CEIL(AVG(value)) from table where col1 = 1 and col2='matchThis' and col3>='2022-04-10T18:30:00.00Z' and col3<='2022-04-25T12:58:2

PSequel not showing table content on my 2020 mac

first i create db in terminal, then i go to PSequel and add a connection with the local host. after i create my table in the query and refresh it, CREATE TABLE

How to separate tables based on the model using FSM and FSM-Log?

I'm currently logging status changes to several models in my Django REST API using the django-fsm and django-fsm-log packages. However, all of the logs are stor