Category "postgresql"

TypeORM - how to reuse entities across many projects?

I've had a few project which is using this same database and entities. How to reuse entities across all of this projects? I don't want to copy all *.entity.ts f

Can I use a python argument in a postgres variable for a query call?

I want to create a python function that takes a start date and end date as arguments. I want the dates passed to the function to be the start date and end date

Hasura inherited role permission inconsistency

I am trying to define two roles in Hasura: role_1: In my_table, can update: column_A and column_B role_2: In my_table, can update: column_C I want an end user t

how to add PSQL user For a Rails app that has full access but can't drop the database

How to configure a PSQL v11.4 user that is not the superuser and does not own the database. This user should have full access to create SQL objects and drop the

postgreSQL - fill in blank date rows per ID

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

Getting an error calling Hasura Insert, "type citext does not exist"

I have an existing Hasura instance that uses Postgres 12 and Hasura 2.2.0. It has a schema called hauth_catalog and in that schema there is a table called users

How can we validate a Postgres database backup is not corrupted?

Is there a efficient way to check if the Postgres backups (for managed services like RDS and Cloudsql) are not corrupted? Currently one of the ways we are imple

log the procedure call messages into a table in postgress

I want the log the execution message of a running stored procedure into a table in postgress --example: create or replace procedure ccc () language sql as $$ in

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database "myname" does not exist

I a rails app running on my local environment using postgresql. This morning I spun up a new one and after install the pg gem, etc. I am running into the follow

How to convert iso 8859 string to UTF8 in a postgresql 12 database?

EDIT : I think I was not clear, I am sorry for that : I have a column with bytea data. This column, when I apply encode(column,'escape') to it, I got text in th

How to build a nested array result from self referencing table

I have a db where a foreign key references my primary key, Ill like to select all rows where the foreign key is NULL and then add rows with a foreign key as nes

Unable to connect to the Postgres database in Docker Compose

I am building a Node JS Web application. I am using Postgres SQL and Sequelize for the database. I have the docker-compose.yaml with the following content.

Distinct and List of other column in postgresql

I am using postgres DB and i have table with two column name and sal . name Sal Raunak 10000 Raunak 5000 Rahul 500 Raunak 300

Using SELECT DISTINCT to retrieve nearly identical array values in PGSQL

In an app that I am currently developing users are allowed to locations identified, amongst other things by their latitude/longitude coordinates. The location e

Express JS TypeError: Cannot read properties of undefined (reading 'id')

I am trying to build a database query with express js to get a recipe from a table that joins a recipe's information with specific ingredients from a third tabl

Consume kafka topic JSON data to postgres using JDBC connector

We have a need to push the kafka topic JSON records to postGresSql database. the JSON are compliant to https://json-schema.org/draft-07/json-schema-release-note

How to connect to postgres on another server where postgres is on docker?

I can connect to postgres in that way. On my local machine i run: ssh name@ip -p 22 input --> password and then sudo docker-compose exec postgres bash afte

How to get the top 1% of soloists calculated by the total number of concerts performed

I'm working on this sql challenge, but I don't know if the way to get the top 1% of soloists calculated by the total number of concerts performed. is correct. P

Found non-empty schema(s) "public" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table

I know this has been asked previously but I am spinning in circles here.... I have a postgres 14 database and a Springboot application running flyway-db:7.13.0

How to repeat event for every 2 weeks on multi selection days up to 3 Occurrence's

I'm working on a google calendar kind of repeat feature using angularjs/php. Trying repeat the event for every 2 weeks on multi selection of days and that even