postgresql Questions

9

Solved

I set up the PostgreSQL using Docker Compose and the content of the file (compose.yaml) is like so: name: postgres-container services: database: image: postgres restart: always environment: - ...
Susian asked 24/10, 2022 at 13:47

2

I've been working on maintenance on this GitHub repo that has been left undeveloped for almost a year. When rerunning the GitHub Actions job that finished to completion last May, there are now issu...
Carpophagous asked 15/2, 2023 at 17:39

3

Solved

I have a function like so - CREATE OR REPLACE FUNCTION ind (bucket text) RETURNS table ( middle character varying (100), last character varying (100) ) AS $body$ BEGIN return query select f...
Wickedness asked 9/9, 2019 at 22:13

2

Solved

I have a database dump in thisdb_2022.dump binary file that I'm trying to import to dbeaver, but I haven't found a way to import the database so I can see it. I found the below in the dbeaver forum...
Backlash asked 3/2, 2022 at 15:55

1

I'm running some complex FTS queries in Postgres 13.4 and discovered some behavior in ts_headline that's unexpected, at least to me, and wasn't sure if I've come across a feature or a bug. ;) Initi...
Circumrotate asked 10/10, 2021 at 4:53

1

Can we in SQL (preferably Postgresql) mimic the pandas function pivot_table? For example, let's say we have a table with the following 3 columns: Name Day Value John Sunday 6 John Monday 3 John...
Euphonious asked 16/11, 2021 at 17:28

2

Solved

I am using the below code to insert to a Postgres DB using tokio-postgres, is there any better option : let members = &[obj] //obj is a struct let mut params = Vec::<&(dyn ToSql + Sync)&...
Anthracosilicosis asked 30/3, 2022 at 22:3

2

I was experimenting on macOS and tried installing postgresql@11 using HomeBrew. Everything went well at first. After that, I uninstalled it this time installed postgresql@14 which went fine too. I...
Mouthwash asked 13/3 at 11:19

4

Solved

I have two tables: CREATE TABLE "user" ( username character varying(35) NOT NULL, CONSTRAINT user_pk PRIMARY KEY (username) ) CREATE TABLE item ( id serial NOT NULL, username character v...
Voyage asked 6/8, 2013 at 12:17

1

I'm trying to display a local time using postgres-rs, with time-rs 0.3 instead of chrono-rs 0.4. But with the timezone set to Europe/Amsterdam, all I get is UTC timestamps with no timezone informat...
Hoashis asked 1/10 at 8:45

3

I have a native postgresql query (opts - jsonb array): select * from table users jsonb_exists_any(opts, ARRAY['CASH', 'CARD']); it works fine in my database console and I'm getting a result: user1...
Rainbow asked 16/5, 2021 at 23:51

3

Solved

I'm using a PostgreSQL DB and I would like to start VACUUM FULL using JPA EntityManager. Version 1 public void doVacuum(){ entityManager.createNativeQuery("VACUUM FULL").executeUpdate() } thro...
Spinose asked 27/10, 2017 at 19:59

3

Solved

I am attempting to execute a raw sql insert statement in Sqlalchemy, SQL Alchemy throws no errors when the constructed insert statement is executed but the lines do not appear in the database. As f...
Tooling asked 20/10, 2021 at 13:20

7

Happy Monday! I've recently run into a weird issue and can't seem to figure out what would be causing it. I have a NextJS project using Prisma and Supabase. When I run the app on my Windows desktop...
Intercalary asked 13/2 at 18:4

3

Solved

I am trying to do a cohort analysis and compare average number of rentals based on the renter's first rental year(= the year where a renter rented first time). Basically, I am asking the question: ...
Petronia asked 24/5, 2016 at 15:34

5

I have a Next.js project where I'm using Prisma to read from Postgresql. I have code like: const rows = await prisma.receipts.findMany({ where: { action_receipts: { // https://www.prisma.io/docs...
Dordrecht asked 7/2, 2022 at 22:31

8

Solved

Whenever I tried to download postGIS from stack builder, Stack builder is not responding and freeze . I do not know what I should do now. All I want to know if there is any other way to download po...
Shiest asked 6/4, 2021 at 5:29

3

Solved

I've decided to write a small webapp using Flask, postgresql and leaflet. I wanted to store coordinates (latitude and longitude) using PostGIS extender for postgresql. My flask application uses Fla...
Diaphaneity asked 29/8, 2016 at 21:10

3

I've installed PostgreSQL: nix-env -iA nixos.postgresql Now when I use psql, I get: psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or d...
Pannonia asked 9/12, 2022 at 11:22

1

Solved

I have a library that needs to fork() to fire-and-forget some code. However when the child process spawned by fork() is destroyed, the DBD::Pg's END is called and inadvertently kills the parents co...
Kazantzakis asked 13/9 at 2:0

4

Solved

Gitlab CI keeps ignoring the sql-files in /docker-entrypoint-initdb.d/* in this project. here is docker-compose.yml: version: '3.6' services: testdb: image: postgres:11 container_name: lbsn-...
Deen asked 8/5, 2019 at 17:20

1

I was using lo_import() + lo_getfunctions to read file content in my server, but the result is not data we can read code: SELECT lo_import($$/home/x/web/a.php$$); this will give an oid = 12312 the...
Basion asked 22/10, 2021 at 21:0

4

Solved

I have model like this in model.go type yourTableName struct { Name string `gorm:"type:varchar(50)" json:"name"` Email string `gorm:"type:varchar(50)" json:"e...
Earnest asked 24/12, 2020 at 4:51

2

Solved

I have a Postgres DB running in a Docker environment which is set up using FluentDocker in a Xunit test. Xunit is configured to run tests serial. When running a single test, everything works fine. ...
Giamo asked 13/6, 2022 at 10:6

3

I want to realize a fulltext search in postgresql combined with a kind of fuzzy search. For my testarea I followed up this article: https://blog.lateral.io/2015/05/full-text-search-in-milliseconds-...
Prevailing asked 8/9, 2017 at 17:59

© 2022 - 2024 — McMap. All rights reserved.