Category "postgresql"

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

Laravel - Method Illuminate\\Support\\Collection::makeHidden does not exist

I want to hide the columns password & OTP ,that is included in $uses result. Actually these 2 columns are part of the users table. I've tried like below. B

Process 'rumpostgreswk' running on linux and took 100% memory and CPU, where does it come from?

I have a question, I'm running a nodeJs server on a Digital Ocean droplet. I'm using pm2 for monitoring the application, everything looks fine. However suddenly

Can postgres insert triggers and/or check be ran without inserting

I would love to be able to validate objects representing table rows using the database's existing constraints (triggers that raise exceptions and checks) withou

Install Diesel error (3 errors) - failed to compile 'diesel_cli v1.4.1'

I'm trying to install database migration utility on my machine and run into multiple errors when trying to run in Powershell. Postgres 13 running I've installed

Create Postgres Docker Image with Database

How to Create Postgres Docker Image with Data? I have this folder/file structure: - initdb - 01-createSchema.sql - 02-createData.sql - Dockerfile The Docke

How to reset password in postgresql (psql) for particular role in case when I list the role name it is not exist?

I have installed PostgreSQL for a long time but just currently learning it. Here is what happened if I run psql in the command prompt C:\Users\VandaRsq>psql

SQL: select all depending nodes from a list of parent

let's take a table called users like this id name ... path 22 John ... 2/8/11/22/ 23 Mark ... 1/3/9/15/21/23/ where the path rapresents the hierarchy parent-c

Nest.JS TypeORM "SCRAM-SERVER-FIRST-MESSAGE: client password must be a string"

I dont know why, but since I was cloning my working repository I am using on AWS to a local machine and try to run it, I am getting the following error: "SCRAM-

Sqlfluff rule L025 breaks due to postgres `generate_series()`

I'm using sqlfluff to lint my postges code. I'm down to a single linting error, in my test code, that I dont know how to fix by adjusting my sql nor how to conf

Database schema design optimized for scoring rows to sort on

I want a table like this which has scores column, and whenever basket1 or basket2 are added to table I want to update scores of the columns in basket.So say bas

how to modify already defined composite key in liquibase

I need to alter a table to modify the order of the indexes created from the composite key for the below mentioned changeset. <changeSet author="demo (generat

How do I extract a date (dd-mm-yy) from a timestamp with timezone (timestamptz) in postgresql

My date column "timestamp" is currently listed as: 2020-11-16 20:27:38.033 +0000 It's formatted as timestamptz and I've tried every search on here and google to

django create a field that hold array of tupels or array of array

I want to add a field in my models that hold value like this field = [(1,2,3),(6,5,4),(5,6,7)] or field = [[1,2,3],[6,5,4],[5,6,7]] I am using po