Questions tagged [postgres-16]
The postgres-16 tag has no usage guidance.
postgres-16
3
questions
0
votes
2
answers
46
views
How to avoid circular relations in postgres using cycle detection
I'm trying to use CYCLE detection in PostgreSQL to avoid circular nesting of groups but cannot figure it out.
I have the following PostgreSQL 16 table:
CREATE TABLE groups (
id serial PRIMARY KEY,
...
0
votes
1
answer
38
views
How can I get a duplicate key error if the row does not match the predicate of the unique index?
I'm using Postgres v16. I've got a unique index on my invoice table:
CREATE UNIQUE INDEX unq_invoice_display_id
ON invoice (tenant_id, display_id, expiry_timestamp)
WHERE id = original_invoice_id;
#...
1
vote
1
answer
35
views
Copying data from one postgres db to another
I want to copy data from one PG database to another, without moving the data to my local and back to the db -
pg_dump -U postgres source_db_name | psql -U postgres target_db_name
pretty certain this ...