Closed Symbolics closed 6 years ago
Wow @sabracrolleton, you have been busy! Job well done. I am now 90 commits behind. At least I am back working with PostModern.
The need for array has come back again. Any chance I can nudge this one towards the top of the queue?
Does this work for you?
(query (:order-by
(:select 'r.rolename 'r.rolsuper 'r.rolinherit
r.rolcreaterole 'r.rolcreatedb 'r.rolcanlogin
r.rolconnlimit
(:as (:array
(:select 'b.rolename
:from (:as 'pg_catalog.pg-auth-members 'm)
:inner-join (:as 'pg-catalog.pg-roles 'b)
:on (:= 'm.roleid 'b.oid)
:where (:= 'm.member 'r.oid )))
'memberof)
'r.rolcreaterextgpfd
'r.rolcreatewextgpfd
'r.rolcreaterexthttp
'r.rolcreaterexthdfs
'r.rolcreatewexthdfs
:from (:as 'pg-catalog.pg-roles 'r))
1))
:array[] operator added in today's commit. Also see documentation on the use of postgresql arrays in the file array-notes.html in the doc directory.
I am trying to reproduce the \du function of pgsql, which is implemented (in GreenPlum) as:
However I am having a bit of trouble with the nested query (ARRAY). Is there any existing POMO-magic that can reproduce this query in s-sql?