Category "postgresql"

need the dv/dt for the below table

How to get the dv/dt of the below table in psql Concept is linear regression - but to determine the slope is the what I am facing issue with. voltage || time

Constant failure to import csv file via copy command in postgrsql

I have a file in my TEMP directory on a windows server echo %TEMP% C:\Users\BOB\AppData\Local\Temp\2 Below command to insert file to table: psql -d BOBDB01 -c

updable view can update the base table, but cannot update view column

BEGIN; SET search_path TO test; CREATE USER regress_view_user1; CREATE USER regress_view_user2; GRANT CREATE, usage ON SCHEMA test TO regress_view_user1; GRANT

How to get rid of Django security vulnerabilities warning signs in terminal

I have a simple Django project with a PostgreSQL backend and I can't seem to get rid of the Django security vulnerabilities warning signs on my terminal. Settin

How to merge multiple tables in postgreSQL (using wildcard)

There are 163 tables, and I want to add two columns in all. And columns should be added from the front. Please tell me how to do it on postgreSQL This is a tabl

postgres docker : role "root" does not exist

I am running docker-compose in Github-Action. docker-compose.yml has following service definition for postgres postgres: container_name: postgres imag

PG::UndefinedTable: ERROR: relation "entries" does not exist

I'm trying to deploy a simple Rails app in heroku but I'm getting this message in the heroku logs: PG::UndefinedTable: ERROR: relation "entries" does not exist

Separate SQL commands in PHP

I have a (dynamically generated) file that includes a lot of SQL Statements that contain only data definition. Usually, I run the whole script as a single trans

Configuring PostgreSQL schema for default Django DB working with PgBouncer connection pool

I need to set the default DB schema for a Django project, so that all tables of all apps (including 3rd party apps) store their tables in the configured Postgre

Unable to create a large json object from a postgreSQL query using json_build_object

I am trying to create a json object from my query using json_build_object as follows: Select json_agg(json_build_object('first_name',first_name,

in many-to-many relationships, can you delete a row from one table without deleting any rows from the second table?

I am creating a database & working on CRUD functions. I've run into a problem with the Delete functionality. I have two tables, connected in a many-to-many

PostgreSQL: Getting the sum of the difference in dates from two separate tables

The following code: SELECT ets.event_id, ets.event_date, dtn.don_date, dtn.don_date - ets.event_date AS date_diff FROM events ets, donation dtn GROUP BY ets.eve

DbUp throwing Npgsql exception when using SQL-language syntax for PostgreSQL functions

I'm using DbUp to deploy to a PostgreSQL-14 database. When I try to create a function or procedure using SQL-language syntax, DbUp throws an Npgsql.PostgresExce

DbUp throwing Npgsql exception when using SQL-language syntax for PostgreSQL functions

I'm using DbUp to deploy to a PostgreSQL-14 database. When I try to create a function or procedure using SQL-language syntax, DbUp throws an Npgsql.PostgresExce

Accessing schema.name from debezium sink connector to postgres

We have a debezium source connectors working perfectly fine, and one of the properties set is, for example: "transforms.SetSchemaMetadata.schema.name": "myschem

Creating Custom Join in Django

I am struggling to create the correct prefetch behavior in Django. Here is the outline of the problem: Each Account has DailyQuotes, updated daily at different

PostgreSQL duplicate key value violates unique constraint while using on conflict do nothing on insert

Table def: CREATE SEQUENCE IF NOT EXISTS lazy_product_stock_id_seq; CREATE TABLE "public"."lazy_product_stock" ( "id" int4 NOT NULL DEFAULT nextval('lazy_pr

Generating counts of open tickets over time, given opened and closed dates

I have a set of data for some tickets, with datetime of when they were opened and closed (or NULL if they are still open). +------------------+-----------------

How to upload and use images on heroku django

so i make this app in which you can make products. And those products have an image that was saved in a file while i was using this app localy. I deployed my ap

persistence jsonb field to h2 using hibernate

source code I want to use jsonb column type. When I used postgresql there is no problem. But when I use H2 I can not persist my entity. Native sql works but whe