Re: [PATCH] Tables node (pgAdmin4)
От | Thom Brown |
---|---|
Тема | Re: [PATCH] Tables node (pgAdmin4) |
Дата | |
Msg-id | CAA-aLv4JqnFtf1t8GbGp9F8m1ocag=ZmQ_x3Y4FjsuChZbtvsg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Tables node (pgAdmin4) (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>) |
Ответы |
Re: [PATCH] Tables node (pgAdmin4)
|
Список | pgadmin-hackers |
On 26 May 2016 at 11:20, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,PFA patch for RM#1231 & RM#1237.Additionally I have shifted 'Advanced tab' after columns & constraint tab.@Thom,Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to populate "Of type" combo box as given below.I was not able to find a way to differentiate between table & composite type populating from below given query,I'll put in todo list, may be someone from community can help in future.SELECT t.oid,quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typnameFROM pg_type t, pg_namespace nWHERE t.typtype='c' AND t.typnamespace=n.oidAND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')ORDER BY typname;
This should work:
SELECT c.oid,
quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
FROM pg_namespace n, pg_class c
WHERE c.relkind = 'c' AND c.relnamespace=n.oid
SELECT c.oid,
quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
FROM pg_namespace n, pg_class c
WHERE c.relkind = 'c' AND c.relnamespace=n.oid
AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema')
ORDER BY typname;
ORDER BY typname;
Although, to avoid confusion, the "typname" alias should probably just be "relname".
Thom
В списке pgadmin-hackers по дате отправления: