From: | "Sibte Abbas" <sibtay(at)gmail(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: psql slash# command |
Date: | 2007-09-14 14:13:03 |
Message-ID: | bd6a35510709140713t5f6bc5d8if4055b2efc999af6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On 9/9/07, Sibte Abbas <sibtay(at)gmail(dot)com> wrote:
> Attached is the patch for the TODO item mentioned at
> http://archives.postgresql.org/pgsql-hackers/2007-09/msg00352.php
>
> The command has the following synopsis:
>
> \#: displays the command history. Like \s but prefixes the lines with line
> numbers
>
> \# <line_no>: executes the command(if any) executed at the line specified by
> line_no
>
> regards,
> --
> Sibte Abbas
>
>
The attached patch adds the following new functionality:
\#e <lineno>: Will open the command at the given lineno in an editor.
\#e with no lineno will behave exactly like \e.
Example:
=====
psql> \#
199: create or replace function foo() returns integer as $$
begin
return 10;
end;
$$language 'plpgsql';
200: select version();
201: select * from foo();
\# 200
<select version() is executed>
psql> \#e 199
<the contents of lineno 199 are opened in the editor>
Definitely not for 8.3, however I hope that it can be queued for 8.4.
thanks,
--
Sibte Abbas
Attachment | Content-Type | Size |
---|---|---|
psql_slash#_v2.patch | text/x-patch | 8.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-09-14 14:17:01 | Re: psql slash# command |
Previous Message | Chris Browne | 2007-09-14 14:08:41 | Re: terms for database replication: synchronous vs eager |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-09-14 14:17:01 | Re: psql slash# command |
Previous Message | Heikki Linnakangas | 2007-09-14 13:38:21 | Re: XML binary I/O (was Re: tsearch refactorings) |