Question : I have the following table: name key uuid na1 k1 NULL na2 k2 NULL na3 k1 NULL If […]
Tag: postgresql-13
postgresql Recursive Update resulting in Sequential Scan
Question : I have a table with a self-referential foreign key, and I would like to update a given parent, […]
UPSERT with UPDATE on variable column gives error “command cannot affect row a second time”
Question : Hey I’m trying to insert or update(if the constraints are duplicated) based on a query result, these are […]
Run calculation not working in sub query, “does not exist”
Question : PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit I have a query that […]
Selecting related data without selecting foreign key from subquery [closed]
Question : Closed. This question is off-topic. It is not currently accepting answers. Too localized – this could be because […]
How to integrate Postgres advisory lock functions into SELECT and UPDATE?
Question : Using Postgres 13 in a Node.js application, I have a simple task to do: SELECT a row (identified […]
RECURSIVE CTE does not use an INDEX. (Disabling seqscan forces it using an index however and it is faster)
Question : Suppose the following relations: match(match_id) event(match_id, seq, gt, …) There are the following indexes: match(match_id) event(match_id, seq) Further […]
Why PG 13 does not allow deferring statement trigger constraints?
Question : I noticed in PG 13 docs that only row constraint triggers can be deferrable. Why not statement constraint […]
Recovery with Postgresql logical replication
Question : I’m using Postgresql 13 on Debian 10.6 and learning about logical replication. I’ve set up logical replication with […]
How to conditionally create JSON array in postgres with group by clause?
Question : I am using Postgresql 13.0 and have a table category as follows: cat_id | cat_name | piece | […]