Re: Patch rev 2: MySQL-ism help patch for psql

From: David Christensen <david(at)endpoint(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Patch rev 2: MySQL-ism help patch for psql
Date: 2010-01-20 00:05:32
Message-ID: BF1176F1-6D5C-427B-97EE-83AC305E805F@endpoint.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Jan 19, 2010, at 6:01 PM, David Christensen wrote:

>
> On Jan 19, 2010, at 4:23 PM, Robert Haas wrote:
>
>> On Tue, Jan 19, 2010 at 5:14 PM, David E. Wheeler <david(at)kineticode(dot)com
>> > wrote:
>>> Why would they want more? It's not MySQL, and they know that. If
>>> we give them some very minor helpful hints for the most common
>>> things they try to do, it would be a huge benefit to them. I know
>>> I've badly wanted the opposite when I've had to use MySQL, but I
>>> don't expect MySQL to implement \c for me.
>>
>> +1. I think this is a well-thought out proposal. I like Tom's
>> suggestion upthread for how to handle \c.
>
> I've attached a second revision of this patch incorporating the
> various feedback I've received.
>
>> Although the deadline for patches for 8.5 has supposedly already
>> passed....
>
> Yeah, I realized this after I scratched my itch, and had just
> thought I would send to the list any way for after the CF; you can
> commit or bump as needed. Patch enclosed as a context-diff
> attachment this time.

I also forgot to enclose the sample output in this version, based
largely on Tom's wording for the USE usecase:

----
machack:machack:5432=# show tables

Perhaps you want "\dt"?
See \? for help with psql commands

[Tue Jan 19 18:04:50 CST 2010]
machack:machack:5432=# use database;

Perhaps you want "\c database" or "set search_path = schema"?
See \? for help with psql commands

[Tue Jan 19 18:05:07 CST 2010]
machack:machack:5432=#
----

Regards,

David
--
David Christensen
End Point Corporation
david(at)endpoint(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-20 00:10:42 Re: lock_timeout GUC patch
Previous Message Tom Lane 2010-01-20 00:05:07 Re: Listen / Notify - what to do when the queue is full