Category "postgresql"

How to fix Rust diesel cli link libpq.lib error on install

I'm trying (for hours now) to install the cargo crate diesel_cli for postgres. However, every time I run the recommended cargo command: cargo install diesel_cli

I am trying to copy a file, but getting error message

I am new to postgres, probably missing something silly like (the correct name of my directory). Can someone guide me? I am following book instructions, Practica

Apply a filter to an automatically joined table

Here's my SQL setup create table a ( id serial primary key, ta text ); create table b ( id serial primary key,

How to simulate database crash in postgreSQL

I'm new into postgresSQL, in my course in "Advance database" we are given a problem to simulate a crash at given location in postgres, is anyone got an idea how

R ODBC DBI error: database does not exist

I'm working on a Mac and trying to connect to my remote Postgres database in R Studio. Error First, the error: Error: nanodbc/nanodbc.cpp:1021: 00000: FATAL: d

Select specific columns from jeft join query, TypeORM

I have a task to get key information about users in database. There are many left joins and the query works quite slow. I'm trying to optimize it somehow and I

problem with postgresql sequence and hibernate

I often read this site, but this is the first time I write, hope I won't make mistakes and apologize for my bad english. I get to the point: I have to develop c

Using 0 as Primary Key

I use lookup tables commonly and sometimes I have some default record in the Lookup table and I think for this record I can use 0 as Primary Key a as shown belo

Error while call prostresql procedure nestjs/typeorm

I have this stored procedure to save a purchase with a token relate. But I'm facing an error when I try to call it in Nestjs/typeorm. I checked and I'm passing

Install postgres extension PGXN "fatal error: unistd.h: No such file or directory"

I need to sync some postgres tables with elasticsearch and come to conclusion that the best solution for my case is the one described here. Unfortunately I'm st

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

everybody! I've finished a laravel project backend with postgres and it has a phpunit tests, everything it works. So, I did upload to Github. When I did "git

Why ST_Intersection from Postgis returns multilinestring for self-intersecting linestrings?

I am trying on PostgreSQL with the extension Postgis to get the geometry of a gps_trace that intersects a box, then i want to get one linestring for each distin

Is it possible to work with different schemas in Fluent with PostgreSQL?

I need to create tables with different number of fields for different users. I want to create a schema for each user, and in it a custom set of tables. I can do

CREATE LANGUAGE plperlu; fails despite postgresql-plperl-12 being installed

I'm on an Ubuntu-derived system (specifically pop_os from System76). I am trying to get Bucardo installed, but it appears to be failing because plperlu is not f

libpq SELECT loop and UPDATE within the loop

I have a C++ program that does something like the following: PGresult* res = PQexec(conn, "SELECT id, foo FROM tbl WHERE some_condition"); for (int r = 0; r <

Unable to create table with postgres-hstore column type in H2 Database

I'm working on requirement to create a new table which has a column of type hstore. This is a Spring Boot app. I have created the JPA entity and run some tests

Where are the postgres logs?

I'm using DBeaver to connect the postgres db and want to access the logs via DBeaver. I run the command below to find log destination and got stderr as the loca

particular column has multiple data separated with comma, how to write a query to return that particular row if it has at least one data

For example col1 col2 1 2,3,4 Referring to the table shown here, if I want to return a row if col1=1 and col2 has 2,3. How to write query for this scenario? B

FOREIGN KEY ON DELETE SET NULL in rails

I'm working with two models in rails class Student < ApplicationRecord belongs_to :school has_many :lessons end and class Lesson

return the row where before and after value is lower

I have a table that looks like this: name val 1 1 2 2 3 1 4 2 5 2 6 10 For each row,