Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Gavin Flower
On 09/10/12 03:53, Robert Haas wrote: On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires wrote: 2012/10/8 Tom Lane : Julien Tachoires writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make the command a great deal slower, since it would have to acc

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Tom Lane : > Julien Tachoires writes: >> 2012/10/8 Tom Lane : >>> The other problem you're going to have here is that there is in fact no >>> such command as "\ds" (nor "\ds+"); rather, it's a special case of >>> \dtsvi. As such, putting any relkind-specific info into the result is >>>

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Robert Haas : > On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires wrote: >> 2012/10/8 Tom Lane : >>> Julien Tachoires writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' >>> >>> That would make the command a great deal slower, since it would

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Tom Lane
Julien Tachoires writes: > 2012/10/8 Tom Lane : >> The other problem you're going to have here is that there is in fact no >> such command as "\ds" (nor "\ds+"); rather, it's a special case of >> \dtsvi. As such, putting any relkind-specific info into the result is >> problematic. I think you're

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Robert Haas
On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires wrote: > 2012/10/8 Tom Lane : >> Julien Tachoires writes: >>> About \ds behaviour, I think to add 2 columns : >>> - 'LastValue' >>> - 'Increment' >> >> That would make the command a great deal slower, since it would have to >> access each sequence

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Tom Lane : > Julien Tachoires writes: >> About \ds behaviour, I think to add 2 columns : >> - 'LastValue' >> - 'Increment' > > That would make the command a great deal slower, since it would have to > access each sequence to get that info. I don't object to adding such > columns to \ds+

Re: [HACKERS] Improving psql \ds

2012-10-07 Thread Tom Lane
Julien Tachoires writes: > About \ds behaviour, I think to add 2 columns : > - 'LastValue' > - 'Increment' That would make the command a great deal slower, since it would have to access each sequence to get that info. I don't object to adding such columns to \ds+, but I don't think it's a good i

[HACKERS] Improving psql \ds

2012-10-07 Thread Julien Tachoires
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 l