From: | Olivier Leprêtre <o(dot)lepretre(at)gmail(dot)com> |
---|---|
To: | "'pgsql-admin'" <pgsql-admin(at)postgresql(dot)org> |
Subject: | filter partitions |
Date: | 2018-02-13 15:07:58 |
Message-ID: | 5a82ff51.8f0c1c0a.ffaa0.df34@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I wonder how could it be possible to extract partitions that contains a
peculiar item
Consider 4 partitions 1, 2, 3, 4 with different items A, B, C... inside
P item
1 A
1 B
1 C
2 B
2 D
2 G
2 H
3 B
3 C
4 X
4 D
4 Z
How could a select return partitions 2,4 because they both contains D item ?
As a result, I would get :
2 B
2 D
2 G
2 H
4 X
4 D
4 Z
I can filter partitions with lag, lead, nth_value... but how could I write
something like "select P,any (item=D) over (partition by P) from..."
Thanks for any help,
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
From | Date | Subject | |
---|---|---|---|
Next Message | Héctor Alonso Lozada Echezuría | 2018-02-13 20:33:01 | Is this function slow? |
Previous Message | David | 2018-02-12 18:54:49 | RHEL 7 Problem with Postgres AD/LDAP Service Account? |