From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: review: psql: edit function, show function commands patch |
Date: | 2010-08-09 11:40:40 |
Message-ID: | AANLkTimYTBF54Au4tW8b3_tBBEwfP5S0Qoi47+bc1p5Y@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/8/9 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sun, Aug 8, 2010 at 11:38 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Um, but \sf *doesn't* give you anything that's usefully copy and
>> pasteable.
>
> Works for me.
>
> \sf ts_debug(regconfig, text)
>
>> And if that were the goal, why doesn't it have an option to
>> write to a file?
>
> Well, you cut-and-paste from a terminal window, not a file, so that's
> a slightly different problem, although perhaps also a good one to
> solve. But I'd rather see us solve that problem via some new pg_dump
> functionality.
>
> Hmm... or perhaps \sf should respect \o. I notice that \d does.
it's not a bad idea.
updated patch attached
>
>> But it's really the line numbers shoved in front that I'm on about here.
>> I can't see *any* use for that behavior except to figure out what part of
>> your function an error message with line number is referring to; and as
>> I said upthread, there are better ways to be attacking that problem.
>> If you've got a thousand-line function (yes, they're out there) do you
>> really want to be scrolling through \sf output to find out what line 714
>> is?
>
> Well, as Pavel points out, I guess you could use the "line number"
> argument to \sf to start at around the place you're interested in,
> athough I suspect that I would probably choose to use \ef in that
> case. I suspect \sf is in general most useful with somewhat shorter
> functions (I'd copy and paste a 100 line function, perhaps, but for a
> 1000 line function I'd probably try to get the definition into a file
> and scp it or whatever).
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise Postgres Company
>
Attachment | Content-Type | Size |
---|---|---|
edit8.diff | text/x-patch | 22.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-08-09 11:47:54 | Re: MERGE Specification |
Previous Message | Robert Haas | 2010-08-09 10:51:08 | Re: review: psql: edit function, show function commands patch |