Category "postgresql"

Golang: Gorm Error on insert or update on table violates foreign key contraint

Im trying to create a REST service using Gorm that on startup will drop the database tables from my Postgres DB and then create and populate them with test data

Multi cloud PostgreSQL replication

I have an Azure-managed PostgreSQL database. I want to create a logical replica of it at GCP, (Google-managed, if possible). At Azure, I've set the Azure replic

PostgreSQL Job Scheduler on Azure DB for PostgreSQL

In Azure Database for PostgreSQL, how do I install a pgAgent? As, its a PaaS only, I will not have access to the Server. In that case, if I need a pgAgent to in

Django tries to write to a generated column

I've added GIN index to my db ALTER TABLE mtn_order ADD COLUMN textsearchable_index_col tsvector GENERATED ALWAYS AS (to_tsvector('english', coalesce(descr, ''

Creating my first table- Syntax error at or near ();

First day of postgreSQL- sorry if this is too basic, but couldn't find the answer on here. So basically I'm following a video tutorial, and have written exactly

Is it possible to cast from one enum to another in PostgreSQL

I need to populate a new table in a second schema from an existing one, but having problems casting the "schema1.a.disclosure_level" column enum to the "schema2

Is it possible to connect to a Postgres DB from SageMaker Data Wrangler?

I set up a regular Postgres DB in AWS using the Amazon Relational Database Service (RDS). I would like to ingest this data using data wrangler for inspection an

C# Npgsql connection checker Exception Throw System.NullReferenceException 'Object reference not set to an instance of an object.'

My code try to check is the PostgreSQL server running and accessible by given credentials for given database. Use the Npgsql NuGet. If all the data, also IP, P

how to pass asc desc as params in python psycopg2 raw sql execution?

i have a sample query template to accept dynamic parameters to execute: ps_conn = psycopg2.connect(...) ps_cursor = ps_conn.cursor() ps_cursor.execute(''' S

Share django transaction across threads

I've a problem where one API implemented in a django (3.2) web app running with gunicorn (gevent) has to fetch different prices from multiple APIs and store tho

Query Slower with different value for a parameter postgress

I´m with an issue where hibernate generates the following query on an existing view. select count(proclistvw0_.proc_id) as col_0_0_ from proc_list_vw

Data cleaning before, during or after data ingestion?

I am building a self-contained data analytics project in Python. As the project needs to be scalable it requires a fairly solid pipeline of data processing and

Return ID of newly inserted row on a PostgreSQL database using C# and Npgsql?

I'm building a WinForms project in C# using a PostgreSQL database and the Npgsql framework. For inserting a record, I need to return the ID of the new record.

Error connecting server to DigitalOcean Postgresql droplet

I am aware that I can connect to a pre-configured Digital Ocean PostgreSQL database cluster and that's what I'm actually connected to right now, but I'd like to

How to use LEFT JOIN LATERAL in typeorm?

I want to use below query in TypeOrm but can't find a way to convert it to TypeOrm. Any help is appreciated. SELECT * FROM blocked_times bt LEFT JOIN LATERAL

Need replace text with single quotes in SQL

I need to make a script that make a replacement of all the registers of a column that contains: '@xxxx', removing the single quotes. (xxxx could be empty or any

how can I run r function from package in postgresql

I am trying to use the R function from a R package (https://cran.microsoft.com/snapshot/2017-04-03/web/packages/genasis/index.html) directly in Postgres without

How to persist List<Object> as jsonb in hibernate

Below the Entity trying to persist : @Data @Entity @Table(name = "REQUEST") @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class) public class Request { @

Generate random pairs SQL

Suppose we have these two tables. TABLE1: |column_1 | ... | -------------------- | 'a' | ... | | 'b' | ... | | 'c' | ... | |

Read Array at index in jpa Query

I have a native Query that return a list of objects, i need to pass an array as parameter to the function getAllUsers. @Repository public interface UserReposito