Question : I need to implement unique check for INSERT and UPDATE operations, but I would prefer to avoid creating […]
Category: Postgresql
Query result with X rows discarded
Question : In a transaction, if I select results to display to the screen, I get the message Query result […]
Is there a better way to add failed node back to postgres cluster?
Question : There are 2 nodes in the cluster: node1(primary) and node2(replica). I will shutdown node1 and promote node2 as […]
Is “deadlock detected” really an error? Should I be suppressing them after handling them?
Question : A while ago, I spent a nightmarish number of weeks dealing with “deadlock detected” and trying to figure […]
Locking issue with concurrent DELETE / INSERT in PostgreSQL
Question : This is pretty simple, but I’m baffled by what PG does (v9.0). We start with a simple table: […]
Insert multiples rows/columns – PostgreSQL 9.2
Question : I’ve got a table that has several columns, But I need to insert data into two columns of […]
Profiling a PostgreSQL function [duplicate]
Question : This question already has answers here: Postgres query plan of a function invocation written in plpgsql (2 answers) […]
postgres finding child tables for particular table
Question : I want to find all child tables corresponding to particular parent table. SELECT * FROM information_schema.table_constraints tc right […]
how can I join two very different table structures? No common keys
Question : For the purpose of good database design, I’ve never run into an issue like this, but we are […]
Postgresql: How to pass an array to trigger function in TG_ARGV?
Question : I’ve got some fairly generic Postgres trigger functions that I’d like to re-use across a few different tables. […]