Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
jira=> WITH RECURSIVE members AS 
  ( SELECT lower_parent_name ,lower_child_name
      FROM cwd_membership
      WHERE child_name='jturner' UNION 
      select m.lower_parent_name ,m.lower_child_name FROM cwd_membership m INNER JOIN members ON members.lower_parent_name=m.lower_child_name
  ) 
SELECT DISTINCT lower_parent_name, lower_child_name from members;
┌───────────────────────────┬──────────────────────────┐
│ lower_parent_name │ lower_child_name │
├───────────────────────────┼──────────────────────────┤
│ jira-users │ jabber-all │
│ crowd-administrators │ jturner │
│ jira-administrators │ jturner │
│ confluence-administrators │ atlassian-administrators │
│ jabber-all │ jturner │
│ atlassian-administrators │ jturner │
│ confluence-users │ jabber-all │
│ change (snc) │ jturner │
│ posix-jumphost-it │ jturner │
│ confluence-administrators │ jturner │
│ jira-admins │ jira-administrators │
└───────────────────────────┴──────────────────────────┘
(11 rows)

...