filter partitions

Поиск
Список
Период
Сортировка
От Olivier Leprêtre
Тема filter partitions
Дата
Msg-id 5a82ff51.8f0c1c0a.ffaa0.df34@mx.google.com
обсуждение исходный текст
Ответы Re: filter partitions  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Re: filter partitions  (Pradeep Kumar <pradeep.kumar.pc@gmail.com>)
Re: filter partitions  (pradeep <pradeep.kumar.pc@gmail.com>)
Список 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,

 

 


Garanti sans virus. www.avast.com

В списке pgsql-admin по дате отправления:

Предыдущее
От: David
Дата:
Сообщение: RHEL 7 Problem with Postgres AD/LDAP Service Account?
Следующее
От: Héctor Alonso Lozada Echezuría
Дата:
Сообщение: Is this function slow?