public inbox for [email protected]  
help / color / mirror / Atom feed
pgcli
2+ messages / 2 participants
[nested] [flat]

* pgcli
@ 2018-01-18 18:15 Amjith Ramanujam <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Amjith Ramanujam @ 2018-01-18 18:15 UTC (permalink / raw)
  To: [email protected]

Hi folks,

I'm Amjith. I created PGCLI <https://www.pgcli.com;, an Opensource client
for Postgres. It is a command line client with GUI features such as
Auto-Completion and Syntax Highlighting.

My goal for participation is gathering consensus to add support in Postgres
to provide support for accessing metadata about a database without
complicated queries.

For example, in order to get a list of tables in a database I have to run a
query like this:

```
        SELECT  n.nspname schema_name,
                c.relname table_name
        FROM    pg_catalog.pg_class c
                LEFT JOIN pg_catalog.pg_namespace n
                    ON n.oid = c.relnamespace
        WHERE   c.relkind = ANY(%s)
        ORDER BY 1,2;'
```

Columns query is even more complicated.

It'll be nice to have a simple database view that ships by default that we
can query to get his info.

I'm also interested to know how other GUI tool devs get this info from the
database.

Cheers!
Amjith


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* re: pgcli
@ 2018-01-18 21:02 legrand legrand <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: legrand legrand @ 2018-01-18 21:02 UTC (permalink / raw)
  To: [email protected] <[email protected]>

Hello,


> to get a list of tables in a database
[...]
maybe you can try with information_schema.tables

> Columns query is even more complicated.
Try information_schema.columns

Regards
PAscal



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-01-18 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 18:15 pgcli Amjith Ramanujam <[email protected]>
2018-01-18 21:02 re: pgcli legrand legrand <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox