Category "postgresql"

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,

PostgreSQL - Alter Column used for a Fulltext Generated Column

On PostgreSQL 13, I have a table define as such : create table my_table ( id serial8 primary key, title varchar(50), description varchar(512), frenc

Error "Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?" in postgresql on docer

I have Django application with postgresql on docker. I tried to insert data like this: import psycopg2 try: connection = psycopg2.connect(user="postgres",

PostgreSQL error: Connection terminated unexpectedly for long queries

I'm trying to add tens of thousands of Twitter profiles to a PostgreSQL database using the function below. The Twitter part works great - I get batches of 5000

PostgreSQL libpq windows 10 CMake missing PostgreSQL_LIBRARY

I'm rying to setup a CMake project under windows 10 using PostgreSQL. When I try to find_package find_package(PostgreSQL REQUIRED) I get the following error

Can't access postgres via service from the postgres container itself

I'm trying to verify that my postgres pod is accessible via the service that I've just set up. As of now, I cannot verify this. What I'm able to do is to log

Openshift: Expose postgresql remotely

I've create a postgresql instance into my openshift origin v3. It's running correctly, however I don't quite figure out why I am not able to reach it remotely.

width_bucket not returning buckets of equal width

I'm using Postgres version 9.6.9 and attempting to use width_bucket() to generate a histogram with buckets consisting of equal widths. However, the query I'm us

postgres time conversion hh:mm:ss.us to hh:mm

Using PostgreSQL database for my attendance application. I have a table with IN and out times (hh:mm:ss.us format). When I subtract the times (OUT -IN) to ca

Nesting json_agg() inside json_agg()

I have these 2 tables tasks and subtasks with these columns: Tasks id name description Subtasks id name description task_id I'm trying to do a query that would

postgres with docker compose gives FATAL: role "root" does not exist error

I'm trying to create a simple demo with postgres on a local windows machine with docker desktop. This is my yaml docker compose file named img.yaml: version: '