Category "postgresql"

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

SQL Some vertical to horizontal field names/values

What I've read here doesn't quite answer what I'm trying to do. That's why I'm posting a request here and I'm confident to learn what I can do on this subject.

Old problem PHP still not resolved. PDO pgsql is slower than pg functions

i fight with same issue as described here: Slow connection PHP PDO Postgres but not MySQL here's the thing - PDO Postgresql connections seem to be really slow

How to create ERD from Heroku PostgreSQL database?

I would like to create ERD from my Heroku PostgreSQL database? How can I generate ERD? Is there any external tool that will help with this? Can you use Dbeaver

Supabase: Filter data with join and logical 'OR'

I'm using Supabase as a database and trying to implement a full-text search. My example setup is quite simple, I have two tables: items +----+-----------+------

Spring boot docker container is running, but cannot access via localhost/browser

I have tried to search other questions, but the solutions arent cutting it. I have a java spring boot application running inside docker, using the command below

How to create ERD from Heroku PostgreSQL database?

I would like to create ERD from my Heroku PostgreSQL database? How can I generate ERD? Is there any external tool that will help with this? Can you use Dbeaver

Metabase Custom Column Casting from Text to Integer

How can I use Custom Column feature in Metabase to cast column from Text to Integer for sum calculation.

Pgadmin server is empty

I have recently installed PostgresSQL and my servers are just empty. I am sure I should have servers under servers and a database to play with but I have nothin

Expression {{current_username()}} is not being read properly by Superset row level security with Postgres

I have been trying to add Row Level Security to Superset and I have written this clause: when I hard code this clause in a select on the database it works as i

Prisma, update scalarList/array

I´m doing an Spotify clone and I´m trying to add a song to a playlist but my query doesn't work, until this point, everything was good following the

Enable logging in postgresql using docker-compose

I am using Postgres as a service in my docker-compose file. I want logging to log file to be enabled when I do docker-compose up. One way to enable logging is b

How to listen for new records in database with Sequelize?

I have a PostgreSQL database with Sequelize ORM and I want to listen for new entries. How should I do? Should I use Sequelize afterCreate hook? Can someone help