Questions tagged [postgresql]

PostgreSQL is an open-source, relational database management system (RDBMS) available for all major platforms including Linux, UNIX, Windows and OS X. Mention your version of Postgres when asking questions. Consider dba.stackexchange.com for questions concerning administration or advanced features.

0 votes
0 answers
9 views

searching for character occueances in a line within a file in Linux and editing it

I have a delimited fileds file that I want to use to load into the database in Linux. but the thing is that the number of delimited fields is not the same in every row. So, I need a shell script to ...
user avatar
0 votes
0 answers
11 views

TypeORM Error sending information to the database

When trying to make a request using postman, my console returns the error: (node:25151) UnhandledPromiseRejectionWarning: ConnectionNotFoundError: Connection "default" was not found. ...
user avatar
  • 21
0 votes
0 answers
15 views

Error Connecting PowerBi Server to PostgresSQL hosted on AWS Relational Database Service via Gateway

After I publish the report to powerbi server, I get this error below when I try to authenticate my datasource with basic credentials. Underlying error code: -2147467259 Underlying error message: ...
user avatar
  • 1
0 votes
0 answers
15 views

How to create @Query() for avg(column) for every n minutes?

I have a postrges query which does that but I cannot translate it into a spring @Query definition: select AVG(price) as price,date_trunc('hour', created) + date_part('minute', created)::int / 5 * ...
user avatar
0 votes
0 answers
12 views

Port forward to postgres kubernetes pod fails with connection reset when executing certain commands via psql

I have a postgres deployment, whose configuration looks like this apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: name: hippo spec: image: registry.developers....
user avatar
0 votes
1 answer
18 views

Syntax Error in Postgresql Trigger Function

I'm brand new. The task was to create a trigger that will delete all dependent tuples from the depositor table when an account in a parent table is deleted. Here's what I've got so far. I keep getting ...
user avatar
0 votes
0 answers
10 views

Creating and accessing Postgres schemas dynamically in Symfony

For a multi-tenant web-project in Symfony I would like to realize a Postgres DB with an own schema for each user. I thought this would be much cleaner (and extensible) than working with an User-ID ...
user avatar
  • 61
0 votes
0 answers
15 views

Docker - connecting Postgres container with Python script

I am trying to create Docker solution which connects my Python script (for creating tables and inserting rows) into Postgres database. Please have on mind I am new into Docker. I followed tutorial ...
user avatar
  • 93
-2 votes
0 answers
33 views

How to retrieve overlapping range dates (and count them) in SQL? [closed]

Given the following table created in a PostgreSQL database using the following SQL statements: CREATE TABLE reservations ( reservation_id INT PRIMARY KEY, check_in_date DATE NOT NULL, ...
user avatar
  • 315
0 votes
0 answers
5 views

Typeorm - Create Postgres IDENTITY Column with EntitySchema

With Typeorm, I know that I can create a Postgres IDENTITY column like this: class User { @PrimaryGeneratedColumn('identity', { generatedIdentity: 'ALWAYS' }) id: number; } But how can I do ...
user avatar
  • 2,114
0 votes
1 answer
13 views

Spring boot does not refer id of user in database

After truncating my database and re-insert it with script my spring doesn't refer to the latest data anymore. But somehow when I create new user, the hibernate still create user id as 1, which in fact ...
user avatar
0 votes
0 answers
15 views

How to convert type Postgres in Laravel?

I use Postgres. As result I expect this query: select * from session_prepared left join cards ON session_prepared.value::bigint = cards.num where type = 'num' and cards.num is NULL Notice that I use ...
user avatar
  • 3
0 votes
0 answers
27 views

Seeding database from collection of JSON objects

I'm trying to set up a small docker project which will be REST API connected with PostgreSql database. I am using Lumen (PHP micro-framework) and there I created migration files for creating couple of ...
user avatar
  • 124
0 votes
0 answers
20 views

How to convert SQL JSONB nested array of uuid to same array with objects

I've a nested array to represent UI from a dynamic report template, but this array (JSONB) contains UUID for each field. I needed to transform this nested array with UUID into a same structure array ...
user avatar
0 votes
0 answers
10 views

Change text column to integer array in postgres

I have a column with comma separated integers (e.g. "25,93,1,3"). I want to change the column type to an integer array. I have tried this, but it corrupts all the data: alter table ...
user avatar
  • 337

15 30 50 per page
1
2 3 4 5
10397