RE: How do I select composite array element that satisfy specific conditions.
В списке pgsql-general по дате отправления:
| От | Charles Clavadetscher |
|---|---|
| Тема | RE: How do I select composite array element that satisfy specific conditions. |
| Дата | |
| Msg-id | 069101d3f289$4c5c38f0$e514aad0$@swisspug.org обсуждение |
| Ответ на | How do I select composite array element that satisfy specific conditions. ("a" <372660931@qq.com>) |
| Список | pgsql-general |
Hi > -----Original Message----- > From: a [mailto:372660931@qq.com] > Sent: Mittwoch, 23. Mai 2018 11:43 > To: pgsql-general <pgsql-general@postgresql.org> > Subject: How do I select composite array element that satisfy specific conditions. > > Hi, say if I have composite type and table > > create type A as( > x float8, > y float8 > ); > > create table B( > Ay A[] > ); > > insert into B > values(array[ > (1,2)::A, > (3,4)::A] > ); > > How could I select the element of Ay that satisfy x=3?? > > Thank you so much!! > > Shore I did not really follow this thread, so I am not in clear, why you want to complicate your life that much. You create a custom data type and then use it in an array in a column. A complex hierarchical structure. Why don't you simply use JSON or JSONB? Your example sounds terribly academic very much like a school assignment. Bye Charles
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера