Questions tagged [postgresql-13]

Use this tag to indicate that your question is about PostgreSQL version 13. Questions concerning database administration should go to https://dba.stackexchange.com/

368 questions
0
votes
1 answer

How do I delete the Postgresql 13 installed by MacPorts?

I tried installing Postgresql 13 on my new computer using MacPorts and have been completely unsuccessful getting anything to run, and not even sure if it is actually completely or properly installed, and I would like to delete all the Postgresql…
GRW
  • 605
  • 12
  • 27
0
votes
0 answers

Data inconsistency in my Postgres application - Where should I look for the problem (first time doing production)?

I'm developing a web application for my SaaS product (and now for the first time running trials with a customer in production). I'd like to ask for suggestions on where to look for possible causes. The general situation is this (I can provide more…
Awer Muller
  • 557
  • 7
  • 17
0
votes
1 answer

How to select from a Postgresql function that requires a table as argument

I have a function that requires a table as input, and returns the same table. CREATE TABLE tab1 (`id` int, `a` int, `b` int, `c` varchar(16), `timestamp` datetime) ; CREATE OR REPLACE FUNCTION func(sp "tab1") RETURNS TABLE ( LIKE…
Pawel095
  • 5
  • 1
  • 5
0
votes
1 answer

SELECT after specific row with non-sequential (uuid) primary key

With the following table: CREATE TABLE users ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), inserted_at timestamptz NOT NULL DEFAULT now() -- other fields ); How could I retrieve n rows after a specific id, ordered by inserted_at ?
Malobre
  • 57
  • 2
  • 7
0
votes
1 answer

Update jsonb column in postgresql

I am trying to update postgres column response_json(type: jsonb) with jsonb data UPDATE test.product SET response_json={'a': '', 'b': ''} WHERE "product_id"=1 I get ERROR ERROR: syntax error at or near "{" Position: 39
Nupur
  • 87
  • 6
0
votes
3 answers

Joining tables based on expanded date range

I've got two tables, orders, and currency_rates. I need to join orders using orders.received_at with currency_rates.valid_from (and also using the common column currency_id, but that's easy). The problem I am facing is that currency_rates.valid_from…
ayasugihada
  • 329
  • 1
  • 2
  • 13
0
votes
1 answer

How to compare time interval (duration) in Postgres jsonpath

In the following example I have two objects on input. I want to select the one where duration between start and end is more that one day -> I expect object called threeDays to be returned. How to write such condition in jsonpath? start and end are…
Michal Foksa
  • 11,225
  • 9
  • 50
  • 68
0
votes
1 answer

Identify if a PostgreSQL dump was created using parallel dump

I am dumping a large database using the -j (--jobs) option as so: pg_dump -U postgres -Fd -j 5 "openiam" -f "/home/pdump" How do I identify this dump was created using the -j option? I want to store dump metadata along with the dump. Is there some…
Parth Shah
  • 1,237
  • 10
  • 24
0
votes
1 answer

PostgreSQL call WITH tables inside a function

This is the question: I want to call a table that i have made inside the WITH from a function. This is the main query WITH RECURSIVE session_data AS ( SELECT * FROM (VALUES(1)) t(ntimes) ) SELECT * FROM my_wonderful_function() This is the…
0
votes
1 answer

How to index objects inside array in JSONB field?

I want to index the JSONB field with GIN indexing. Inside this field, I have an array of objects. Precisely, this is how it looks (shortened second object with three dots): [ { "tags": ["student work", "fast apply"], "intensity":…
Ulvi
  • 965
  • 12
  • 31
0
votes
0 answers

PostgreSQL Random bug with a specific password

Recently upgraded my PostgreSQL version from 10.x to 13 and i have came across a weird bug related to user authentication while accessing the DB. These are the old credentials which i was using to connect with PostgreSQL 10.x…
ravi ranjan
  • 143
  • 1
  • 4
0
votes
1 answer

psql on WSL: Not listing all databases for owner postgres

I'm trying to setup Postgres on WSL (bash) to be able to use pg_dump (as an absolute beginner). I've followed the steps from here twice, once after purging the entire installation. At step 3: I used sudo service postgresql status as systemctl…
0
votes
2 answers

how can i loop insert query?

I have a problem like this: I need to optimize the application, with db (postgreSQL), the table looks like this: CREATE TABLE voter_count( id SERIAL, name VARCHAR NOT NULL, birthDate DATE…
0
votes
1 answer

PostgreSQL Transaction Id is Always Zero

When investigation a performance issue on PostgreSQL, I found out from logs that transaction ID is always Zero, while virtual transaction ID is always defined, from PG docs zero in transaction id means there is no transaction, please how could this…
Wafa
  • 146
  • 3
  • 9
0
votes
1 answer

is it possible to upgrade postgresql from 9.4 to 13.3 using pg_upgrade?

When i try to Upgrade 9.4 to 13 using pg_upgrade , the Upgrade stops in between with authentication failure using the password from pgpass.conf file . The same approach works from 9.4 to 9.6 Here is the pg_upgrade command that i…