Category "postgresql"

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

node and express - how to use fake data

It's been a while since I used node and express and I was sure that this was possible, but i'm having an issue of figuring it out now. I have a simple postgres

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

Parameter substitution when calculating the distance between each row and a common point results in psycopg2 parse error

I have two models with no relation Port and a WareHouse each with a lat and long fields. I want to be able to get the distance for each warehouse from the Port

AWS SCT error while connecting to PostgreSQL 13.4

I get the following error when trying to connect to postgres as a target using AWS SCT: LOADER ERROR: Error executing 'load-contexts' query: org.postgresql.util

SQL referrals view

I have a table with users: id referred_by_user_id ----------------------------------- 1 null 2 1 3 1 4

Debezium with RDS postgres and master-replica failover

I have an RDS multi-AZ postgres database (primary-standby) and I'm investigating Debezium to stream changes to Kafka. I was reading the documentation of what co

How can I do a loop "do/while" to insert some data to Postgres Database?

I did this class to do the inserts but every time I need insert again, I need initialize the method main of this class again. Because it is in just one cycle. p

Migration from dataSource get the error: Cannot execute operation on "default" connection because connection is not yet established

My typeorm version is 0.3.6. Whenever i tried to use dataSource.runMigration() i get this error, MIGRATION ERROR:CannotExecuteNotConnectedError: Cannot execute

PGSQL query to get all records of a column containing line breaks

What is the shortest Pgsql query to get all records that contain a line-break in a given column ?

can't have email on existing user golang

I'm trying to check if an user already have a email. I wrote a function like this : func IsUniqueEmail(body io.ReadCloser) (database.User, error) { connection :

ValidationFailedException after Liquibase update to 4.9.1

We were using older Liquibase that we now wanted to update to 4.9.1 due to vulnerabilities in older versions. However, now at least one of our old migrations fa