Re: Improving psql \ds

From: Julien Tachoires <julmon(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving psql \ds
Date: 2012-10-08 15:10:38
Message-ID: CAFEQCbFPxa=ZhztjYLZwKd-v3HkBgfdT3XqrTURjs=J1OGw1-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/10/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Julien Tachoires <julmon(at)gmail(dot)com> writes:
>> 2012/10/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> 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 going to have to invent a different command
>>> if you want there to be sequence-specific columns.
>
>> Yes, that's why I plan to create a new function listSequences() and
>> call it from src/bin/psql/command.c :
>> + /* \d* commands */
>> + else if (cmd[0] == 'd')
>> + {
>> ...
>> + case 's':
>> + success = listSequences(pattern, show_verbose);
>> + break;
>
> No, that's not acceptable, because it will break cases such as "\dstv".
>
> The \dxxx command namespace is already direly overloaded; I'm not sure
> cramming more behaviors into it is a good idea anyway. Perhaps
> something along the line of "\seqs" would be a usable substitute.

Ok. Does having both '\ds' and , let's call it '\seqs', won't be
source of confusion for the user ?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-10-08 15:14:50 Re: Add FET to Default and Europe.txt
Previous Message Tom Lane 2012-10-08 15:10:08 Re: Add FET to Default and Europe.txt