Questions tagged [postgresql-14]

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

227 questions
10
votes
2 answers

create index concurrently on partitioned table

I am using postgresql 14.1, and I re-created my live database using parititons for some tables. since i did that, i could create index when the server wasn't live, but when it's live i can only create the using concurrently but unfortunately when I…
ufk
  • 30,912
  • 70
  • 235
  • 386
8
votes
1 answer

Filtering in count function - Postgresql

I have the following query which gives me the amount of referrals users have. However, I would like to only count the referral if the referred user has activated the premium plan. How could this be achieved? Dbfiddle here. I am using PostgreSQL…
Santeri Sarle
  • 863
  • 7
  • 12
6
votes
2 answers

Postgres server error on mac ["root" execution of the PostgreSQL server is not permitted. The server must be started under an unprivileged user ID]

Anyone to help me solve this issue that has been on my case for the last couple of hours? I have so far tried all suggested solutions but can't seem to find anything working. Error: "root" execution of the PostgreSQL server is not permitted. The…
Kas Barlow
  • 101
  • 2
  • 7
4
votes
1 answer

How to read the function body of a Postgres standard-SQL function?

In Postgres 14 a new kind of syntax was added to CREATE FUNCTION where the body of the function can be specified directly in SQL rather than being contained in a string. The string bodies of functions are easily accessible in pg_proc.prosrc, while…
nyctef
  • 474
  • 6
  • 12
4
votes
2 answers

invalid length of startup packet docker postgressql

PostgreSQL init process complete; ready for start up. 2022-05-16 19:28:51.674 UTC [1] LOG: starting PostgreSQL 14.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit 2022-05-16 19:28:51.674 UTC [1] LOG: …
Rakesh kv
  • 53
  • 1
  • 1
  • 3
4
votes
2 answers

Efficient full text search in PostgreSQL, sorting on another column

In PostgreSQL, how can one efficiently do a full text search on one column, sorting on another column? Say I have a table tbl with columns a, b, c, ... and many (> a million) rows. I want to do a full text search on column a and sort the results by…
3
votes
2 answers

Postgres generated column is not immutable

I am adding some columns to a table, and want a generated column that combines them together that I'll use for a unique index. When I try to add the column, I get the error ERROR: generation expression is not immutable. I followed the solution from…
Kevin
  • 1,080
  • 3
  • 15
  • 41
3
votes
1 answer

postgreSQL password authentication failed for user

I'm taking a full WebDev course and got really hard stuck on this matter. I've installed postgreSQL 14.2 for Windows 10 and the instructor said that pgAdmin4 would come together, which it didn't, so then i installed pgAdmin4 individually. I've…
matheusarb
  • 33
  • 1
  • 5
2
votes
1 answer

Updating "anyarray" or "anyelement" polymorphic functions when upgrading to 14.x or higher on AWS RDS aurora postgresql

When upgrading AWS RDS aurora postgresql cluster from 11.17 -> 15.2, I was met with this fatal error in the pg_upgrade logs: fatal Your installation contains user-defined objects that refer to internal polymorphic functions with arguments of type…
2
votes
1 answer

Why does PostgreSQL use so much memory during multiple insert than copy?

I have been practising bulk load using Laurenz Albe' s blog https://www.cybertec-postgresql.com/en/postgresql-bulk-loading-huge-amounts-of-data/. The problem start when I changed it a little bit. The table is the same: CREATE TABLE t_sample ( a…
2
votes
1 answer

How do I resolve a "permission denied for schema public" error for PostgreSQL on GitHub Actions?

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 issues related to permission for CREATE in the public…
Nick
  • 21
  • 2
2
votes
1 answer

Cannot edit or delete data or rows within phppgadmin

When I try to edit data in phppgadmin, no matter which table or row, I always got following notification 'No unique identifier for this row.' and nothing is changed/saved. The user I'm logged in has full privileges on the database and all tables in…
codyLine
  • 509
  • 2
  • 8
  • 26
2
votes
2 answers

column-level security with policies in PostgreSQL 14 / PostgREST?

I'm using PostgREST as an API for a project and now implement the security functions. One thing I'd like to have but that is covered neither by row- nor by column-level security as I've read them so far is this use case: Table USERS is public…
Tom
  • 2,688
  • 3
  • 29
  • 53
2
votes
1 answer

ERROR: invalid input syntax for type uuid on wrong column - Postgresql 14.2

I am in progress of writing a function that takes 2 objects. My goal is to have the restaurant be optionally inserted if it does not exist followed by inserting the food item into its respective tables. I need to write a function because I am using…
Josh J
  • 21
  • 1
  • 4
2
votes
2 answers

Displaying chat messages of punished users only to themselves

I have prepared a simple test case for my question. In an online word game for 2 players based on PostgreSQL 14.2, when someone is misbehaving I set their "muted" column to "true". Then the chat messages coming from the punished users should be…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
1
2 3
14 15