Improving psql \ds
От | Julien Tachoires |
---|---|
Тема | Improving psql \ds |
Дата | |
Msg-id | CAFEQCbEtA5QSXOyr16cz3K-ydQ1Zj8p6yVLkHptK1d4aDjdYjA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Improving psql \ds
|
Список | pgsql-hackers |
Hi, I would like to work on psql \ds improvements. Here's my idea : - in src/bin/psql/describe.c, add a new function : listSequences(*pattern, verbose) wich will list sequences and remove code related to sequences from listTables() - in src/bin/psql/command.c, call listSequences() on \ds - about listSequences() implementation : - get list from pg_catalog.pg_class WHERE relkind = 'S' - for each seq. name,get details using : SELECT * FROM <seqname>; (is there an other way to do that ?) About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' for \ds+ : - all extras informations available from the sequence table. BTW, why don't we get last_value value with pg_catalog.pg_sequence_parameters(oid) ? I guess this is because last_value is not a parameter... Perhaps, having a pg_sequence_all(oid) or something like that, giving all informations from the seq. table could be usefull. Thought ? Cheers,
В списке pgsql-hackers по дате отправления: