Category "postgresql"

Fill nulls with lag, but ignore nulls isn't supported

I have a table which looks like this: ID money_earned days_since_start 1 1000 1 1 2000 2 1 null 3 1 3000 4 1 2000 5 2 1000 1 2 null 2 2 100 3 I want that rows

TypeORM Deferrable Primary Key with Postgres

I am using TypeORM with Postgres. I see against RelationOptions it is possible to set the FK to deferrable, is there any option to set the same against the prim

AWS Aurora: bulk upsert of records using pre-formed SQL Statements

Is there a way of doing a batch insert/update of records into AWS Aurora using "pre-formed" Postgresql statements, using Python? My scenario: I have an AWS lamb

Error while triggering quartz job in spring boot, kubernetes

I'm using Quartz Scheduler in Spring Boot with Postgres as Database. It was working fine in local enivornment with both dev and prod profile, but once we deploy

Cannot Automate Dropping of Tables via Jupyter with Postgres

So I am trying to automate the dropping of TABLES in my Postgresql table I ensure the connections are working, I have done multiple queries previously, Now I wa

How do I delete images that are not used in the database?

I have written scripts that check images in a directory and in a database. I need to delete images in a directory that are not in the database. How can I do thi

Imperatively map both entity and value object inside that entity to one table

Let's say I have an entity which is mapped to a postgresql table in sqlalchemy. @dataclass class User: id: int email: str password: str country:

Recursive query to produce edges of a path?

I have a table paths: CREATE TABLE paths ( id_travel INT, point INT, visited INT ); Sample rows: id_travel | point | visited -----------+-------+

ER diagram to Postgres SQL

n real, ProductID integer , PRIMARY KEY () )

Problem in serverless function (serverless framework) when using sequelize orm to make requests to the database

I’m trying to set up a simple serverless environment using serverless framework, there is only one lambda function that makes a call to the database using

Postgresql offset optimization in partitions

I created a table: create table test (id serial, name varchar(20), rownumber serial) partition by range (id); then I created index create index "test_rownumber

PLPGSQL function returns ERROR: integer out of range even if value is correct

I'm experiencing strange behaviour on two Postgres functions returning a single bigint value. The first one returns the correct value while the second one throw

Sorting and Filter Over PII Data

I have a large set of User PII data, currently, we are storing on Relational Data encrypted with AWS KMS. Now I have to paginate data based on UserName. The onl

GAE Connection to SQL: password authentication failed for user 'postgres'

nodejs app on GAE flex deploys correctly, but won't connect to postgres, even though initial knex migration worked and the tables were created. Ive read through

No data in the changelog topic for a KSQL table

Step 1. Postgres CDC Data I have a Postgres table which has been set up to use Debezium PostgreSQL Connector to generate CDC. In Kafka, I can see the CDC data i

Decoupling Win authentification, ODCB driver authentification and SQL authentification - ODCB auth error and DLookup error

I'm trying to connect a user to my company's postgreSQL Server to access a postgres database via MS Access 2019. Connection should be established via ODCB drive

Postgresql update 200 random records

I've got a query returning 200 random distinct foo from my Database. I want to update the notes field for those rows. select distinct on (foo, random()) * from

Are indexes built CONCURRENTLY different in any way?

Does PostgreSQL CREATE INDEX CONCURRENTLY mean that even after initial index build, new and future inserts won't be indexed immediately (strongly consistent in

How to assign an instance to a variable - .find() / .where() - and access it's values - RUBY on RAILS

account = Account.find(params[:account_id]) account_to_receive = Account.where(number_account: transaction.account_to_transfer) So I am building a bank app I wo

Fixing django inspectdb after importing postgresql sample database

Context: I'm playing around with setting up a DRF project using the postgresql sample database located here: Postresql Sample DB Problem: The sample database is