Pavel Stehule pavel.steh...@gmail.com writes:
attached updated \sf implementation. It is little bit simplyfied with
support a pager and output forwarding. Formating was updated per Tom's
request.
Applied with corrections --- mostly, fixing it to not trash the query
buffer, which would
Pavel Stehule pavel.steh...@gmail.com writes:
attached updated \sf implementation. It is little bit simplyfied with
support a pager and output forwarding.
The line number argument to this greatly complicates the code but
doesn't appear to me to have much practical use. Why would you bother
2010/8/11 Robert Haas robertmh...@gmail.com:
On Wed, Aug 11, 2010 at 12:28 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Tue, Aug 10, 2010 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
BTW, at least in the usage in that loop,
Hello
attached updated \sf implementation. It is little bit simplyfied with
support a pager and output forwarding. Formating was updated per Tom's
request.
Regards
Pavel Stehule
BTW, the last I looked, \sf+ was using what I thought to be a quite ugly
and poorly-considered formatting for the
On Tue, Aug 10, 2010 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
The \e patch definitely needs another read-through. I noticed a number
of comments that were still pretty poor English, and one ---
/* skip header lines */
--- that seems just plain wrong. The actual intent of that
Robert Haas robertmh...@gmail.com writes:
On Tue, Aug 10, 2010 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
BTW, at least in the usage in that loop, get_functiondef_dollarquote_tag
seems grossly overdesigned. It would be clearer, shorter, and faster if
you just had a strncmp test for AS
On Wed, Aug 11, 2010 at 12:28 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Tue, Aug 10, 2010 at 11:58 PM, Tom Lane t...@sss.pgh.pa.us wrote:
BTW, at least in the usage in that loop, get_functiondef_dollarquote_tag
seems grossly overdesigned. It would be
Robert Haas robertmh...@gmail.com writes:
... If you're still unhappy with it, you're going to need to
be more specific, or hack on it yourself.
I'm doing another pass over this. I notice that the documentation
claims the syntax of \e is \e [FILE] [LINE], but what is actually
implemented is
On Wed, Aug 11, 2010 at 6:21 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
... If you're still unhappy with it, you're going to need to
be more specific, or hack on it yourself.
I'm doing another pass over this. I notice that the documentation
claims the
Robert Haas robertmh...@gmail.com writes:
I suggest that we punt the \sf portion of this patch back for rework for
the next CommitFest, and focus on getting the \e and \ef changes
committed. I think the \sf code can be a lot simpler if we get rid of
the code that's intended to recognize the
On Mon, Aug 9, 2010 at 7:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote:
updated patch attached
I spent some time cleaning this up tonight. I think that the \e and
\ef portions are now ready to commit, but I am not quite happy with
the \sf stuff yet, so I've broken that out into a separate
Robert Haas robertmh...@gmail.com writes:
I spent some time cleaning this up tonight. I think that the \e and
\ef portions are now ready to commit, but I am not quite happy with
the \sf stuff yet, so I've broken that out into a separate patch,
which is also attached.
Barring objections,
2010/8/9 Tom Lane t...@sss.pgh.pa.us:
Robert Haas robertmh...@gmail.com writes:
On Sun, Aug 8, 2010 at 1:14 PM, Tom Lane t...@sss.pgh.pa.us wrote:
What exactly is the point of the \sf command?
I rather like \sf, actually; in fact, I think there's a decent
argument to be made that it's more
Hello
2010/8/8 Tom Lane t...@sss.pgh.pa.us:
Pavel Stehule pavel.steh...@gmail.com writes:
updated patch attached
What exactly is the point of the \sf command? It seems like quite a lot
of added code for a feature that nobody has requested, and whose
definition is about as ad-hoc as could
On Sun, Aug 8, 2010 at 11:38 PM, Tom Lane t...@sss.pgh.pa.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
2010/8/9 Robert Haas robertmh...@gmail.com:
On Sun, Aug 8, 2010 at 11:38 PM, Tom Lane t...@sss.pgh.pa.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
On Aug 8, 2010, at 8:38 PM, Tom Lane wrote:
Um, but \sf *doesn't* give you anything that's usefully copy and
pasteable. And if that were the goal, why doesn't it have an option to
write to a file?
But it's really the line numbers shoved in front that I'm on about here.
I can't see *any*
2010/8/9 David E. Wheeler da...@kineticode.com:
On Aug 8, 2010, at 8:38 PM, Tom Lane wrote:
Um, but \sf *doesn't* give you anything that's usefully copy and
pasteable. And if that were the goal, why doesn't it have an option to
write to a file?
But it's really the line numbers shoved in
Pavel Stehule pavel.steh...@gmail.com writes:
updated patch attached
What exactly is the point of the \sf command? It seems like quite a lot
of added code for a feature that nobody has requested, and whose
definition is about as ad-hoc as could be. Personally I'd much sooner
use \ef for
2010/8/8 Tom Lane t...@sss.pgh.pa.us:
Pavel Stehule pavel.steh...@gmail.com writes:
updated patch attached
What exactly is the point of the \sf command? It seems like quite a lot
of added code for a feature that nobody has requested, and whose
definition is about as ad-hoc as could be.
On Sun, Aug 8, 2010 at 1:14 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Pavel Stehule pavel.steh...@gmail.com writes:
updated patch attached
What exactly is the point of the \sf command? It seems like quite a lot
of added code for a feature that nobody has requested, and whose
definition is
Robert Haas robertmh...@gmail.com writes:
On Sun, Aug 8, 2010 at 1:14 PM, Tom Lane t...@sss.pgh.pa.us wrote:
What exactly is the point of the \sf command?
I rather like \sf, actually; in fact, I think there's a decent
argument to be made that it's more useful than the line-numbering
stuff
On Tue, Aug 3, 2010 at 7:20 AM, Pavel Stehule pavel.steh...@gmail.com wrote:
I hope so I found and fixed last issue - the longer functions was
showed directly - without a pager.
As a matter of style, I suggest leaving bool *edited as the last
argument to do_edit() and inserting int lineno as
On Mon, Aug 02, 2010 at 11:34:02PM -0400, Robert Haas wrote:
On Mon, Aug 2, 2010 at 11:17 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Well, it'd still work fine for \e foo. It'll just
On Wed, Aug 4, 2010 at 10:10 AM, David Fetter da...@fetter.org wrote:
On Mon, Aug 02, 2010 at 11:34:02PM -0400, Robert Haas wrote:
On Mon, Aug 2, 2010 at 11:17 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane
Hello
updated patch attached
2010/8/4 Robert Haas robertmh...@gmail.com:
On Tue, Aug 3, 2010 at 7:20 AM, Pavel Stehule pavel.steh...@gmail.com wrote:
I hope so I found and fixed last issue - the longer functions was
showed directly - without a pager.
As a matter of style, I suggest leaving
David Fetter da...@fetter.org writes:
On Mon, Aug 02, 2010 at 11:34:02PM -0400, Robert Haas wrote:
A side question is whether this should be an environment variable or
a psql variable.
I'd say yes. As with $EDITOR/PSQL_EDITOR, there should be something
that looks for an overriding psql
On Wed, Aug 4, 2010 at 3:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Well, the thing about $EDITOR is that it's a very-widely-understood
convention. This one won't be, so the argument for making it an
environment variable seems pretty thin.
Fwiw the +linenumber convention has been part of
On Wed, Aug 4, 2010 at 8:50 PM, Greg Stark gsst...@mit.edu wrote:
On Wed, Aug 4, 2010 at 3:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Well, the thing about $EDITOR is that it's a very-widely-understood
convention. This one won't be, so the argument for making it an
environment variable seems
Robert Haas robertmh...@gmail.com writes:
On Wed, Aug 4, 2010 at 8:50 PM, Greg Stark gsst...@mit.edu wrote:
On Wed, Aug 4, 2010 at 3:35 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Well, the thing about $EDITOR is that it's a very-widely-understood
convention. This one won't be, so the argument for
attached updated patch
* don't use a default option for navigation in editor - user have to
set this option explicitly
* name for this psql variable is EDITOR_LINENUMBER_SWITCH -
* updated comments, doc and some issues described by Robert
Regards
Pavel Stehule
2010/8/3 Robert Haas
Hello
2010/8/3 Pavel Stehule pavel.steh...@gmail.com:
attached updated patch
* don't use a default option for navigation in editor - user have to
set this option explicitly
* name for this psql variable is EDITOR_LINENUMBER_SWITCH -
* updated comments, doc and some issues described by
Hello
I hope so I found and fixed last issue - the longer functions was
showed directly - without a pager.
Regards
Pavel
2010/8/3 Pavel Stehule pavel.steh...@gmail.com:
Hello
2010/8/3 Pavel Stehule pavel.steh...@gmail.com:
attached updated patch
* don't use a default option for
On Sun, Aug 1, 2010 at 11:48 PM, Robert Haas robertmh...@gmail.com wrote:
b) more robust algorithm for header rows identification
Have not gotten to this one yet.
I notIce that on WIN32 the default editor is notepad.exe and the
default editor navigation option is /. Does notepad.exe /lineno
Robert Haas robertmh...@gmail.com writes:
This is actually my biggest concern about this patch - that it may be
just too much of a hassle to actually make it work for people. I just
tried setting $EDITOR to MacOS's TextEdit program, and it turns out
that TextEdit doesn't understand +. I'm
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
This is actually my biggest concern about this patch - that it may be
just too much of a hassle to actually make it work for people. I just
tried setting $EDITOR to MacOS's TextEdit
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I'm tempted
to suggest forgetting about any user-configurable parameter and just
provide code that strcmp's the $EDITOR value to see if it recognizes the
editor name, otherwise do
On Mon, Aug 2, 2010 at 11:17 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I'm tempted
to suggest forgetting about any user-configurable parameter and just
provide code that strcmp's the
2010/8/3 Robert Haas robertmh...@gmail.com:
On Sun, Aug 1, 2010 at 11:48 PM, Robert Haas robertmh...@gmail.com wrote:
b) more robust algorithm for header rows identification
Have not gotten to this one yet.
I notIce that on WIN32 the default editor is notepad.exe and the
default editor
2010/8/3 Robert Haas robertmh...@gmail.com:
On Mon, Aug 2, 2010 at 11:17 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 2, 2010 at 10:49 PM, Tom Lane t...@sss.pgh.pa.us wrote:
I'm tempted
to suggest forgetting about any user-configurable parameter
On Sun, Aug 1, 2010 at 12:15 AM, Pavel Stehule pavel.steh...@gmail.com wrote:
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Jul 25, 2010 at 11:42 AM, Pavel Stehule pavel.steh...@gmail.com
wrote:
I'm setting this as ready for committer.
Thank you very much
I took a look at this
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Aug 1, 2010 at 12:15 AM, Pavel Stehule pavel.steh...@gmail.com
wrote:
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Jul 25, 2010 at 11:42 AM, Pavel Stehule pavel.steh...@gmail.com
wrote:
I'm setting this as ready for committer.
Pavel Stehule pavel.steh...@gmail.com writes:
so my plan
a) fix problem with ambiguous $function* like you proposed
b) fix problem with first row excepting - I can activate a detection
only for plpgsql language - I can identify LANGUAGE before.
Ick. We should absolutely NOT have a
On Sun, Aug 1, 2010 at 10:47 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Pavel Stehule pavel.steh...@gmail.com writes:
so my plan
a) fix problem with ambiguous $function* like you proposed
b) fix problem with first row excepting - I can activate a detection
only for plpgsql language - I can
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Aug 1, 2010 at 10:47 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Pavel Stehule pavel.steh...@gmail.com writes:
so my plan
a) fix problem with ambiguous $function* like you proposed
b) fix problem with first row excepting - I can activate a
Robert Haas robertmh...@gmail.com writes:
On Sun, Aug 1, 2010 at 10:47 AM, Tom Lane t...@sss.pgh.pa.us wrote:
The need to count lines manually in function definitions is
far less than it was back when that kluge was put in.
Why?
That hack goes back to plpgsql's prehistory (it's there, though
On Sun, Aug 1, 2010 at 11:35 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Robert Haas robertmh...@gmail.com writes:
On Sun, Aug 1, 2010 at 10:47 AM, Tom Lane t...@sss.pgh.pa.us wrote:
The need to count lines manually in function definitions is
far less than it was back when that kluge was put in.
Robert Haas robertmh...@gmail.com writes:
On Sun, Aug 1, 2010 at 11:35 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Personally, rather than sweat about what the exact definition of line
numbers is, I think we should be moving further in the direction of
being able to regurgitate source text to
Hello
I am sending a modified patch - changes:
a) remove special row number handling of plpgsql (first patch)
b) more robust algorithm for header rows identification
Regards
Pavel Stehule
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Aug 1, 2010 at 10:47 AM, Tom Lane t...@sss.pgh.pa.us
On Sun, Aug 1, 2010 at 4:53 PM, Pavel Stehule pavel.steh...@gmail.com wrote:
a) remove special row number handling of plpgsql (first patch)
Committed.
b) more robust algorithm for header rows identification
Have not gotten to this one yet.
--
Robert Haas
EnterpriseDB:
On Sun, Jul 25, 2010 at 11:42 AM, Pavel Stehule pavel.steh...@gmail.com wrote:
I'm setting this as ready for committer.
Thank you very much
I took a look at this tonight and am a bit mystified by the following bit:
+ /*
+* PL doesn't calculate
Robert Haas robertmh...@gmail.com writes:
I took a look at this tonight and am a bit mystified by the following bit:
+ /*
+* PL doesn't calculate first row of function's body
+* when first row is empty. So checks first row,
2010/8/1 Robert Haas robertmh...@gmail.com:
On Sun, Jul 25, 2010 at 11:42 AM, Pavel Stehule pavel.steh...@gmail.com
wrote:
I'm setting this as ready for committer.
Thank you very much
I took a look at this tonight and am a bit mystified by the following bit:
+ /*
+
On 23/07/10 20:55, Pavel Stehule wrote:
Hello
2010/7/23 Jan Urbański wulc...@wulczer.org:
On 21/07/10 14:43, Pavel Stehule wrote:
Hello
I am sending a actualised patch.
OK, thanks. This time the only thing I'm not happy about is the error
message from doing:
\ef func 0
\e /etc/passwd xxx
2010/7/25 Jan Urbański wulc...@wulczer.org:
On 23/07/10 20:55, Pavel Stehule wrote:
Hello
2010/7/23 Jan Urbański wulc...@wulczer.org:
On 21/07/10 14:43, Pavel Stehule wrote:
Hello
I am sending a actualised patch.
OK, thanks. This time the only thing I'm not happy about is the error
Hello
2010/7/23 Jan Urbański wulc...@wulczer.org:
On 21/07/10 14:43, Pavel Stehule wrote:
Hello
I am sending a actualised patch.
Hi, thanks!
I understand to your criticism about line numbering. I have to
agree. With line numbering the patch is longer. I have a one
significant reason for
On 21/07/10 14:43, Pavel Stehule wrote:
Hello
I am sending a actualised patch.
Hi, thanks!
I understand to your criticism about line numbering. I have to
agree. With line numbering the patch is longer. I have a one
significant reason for it.
CREATE OR REPLACE FUNCTION public.foo()
On Thu, Jul 22, 2010 at 6:56 PM, Jan Urbański wulc...@wulczer.org wrote:
the rest are just stylistic nitpicks.
But, if the patch author doesn't fix them, the committer has to, so
your nitpicking is much appreciated, at least by me!
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The
Hello
I am sending a actualised patch.
I understand to your criticism about line numbering. I have to agree.
With line numbering the patch is longer. I have a one significant
reason for it. There are not conformance between line numbers of
CREATE FUNCTION statement and line numbers of function's
Pavel Stehule pavel.steh...@gmail.com writes:
CREATE OR REPLACE FUNCTION public.foo()
RETURNS integer
LANGUAGE plpgsql
1 AS $function$ begin
2 return 10/0;
3 end;
$function$
This is very trivial example - for more complex functions, the correct
line
On Fri, Jul 16, 2010 at 10:29 AM, Jan Urbański wulc...@wulczer.org wrote:
The patch adds the following features:
* \e file.txt num - starts a editor for the current query buffer and
puts the cursor on the [num] line
* \ef func num - starts a editor for a function and puts the cursor on the
Hello
2010/7/16 Jan Urbański wulc...@wulczer.org:
Hi,
here's a review of the \sf and \ef [num] patch from
http://archives.postgresql.org/message-id/162867791003290927y3ca44051p80e697bc6b19d...@mail.gmail.com
== Formatting ==
The patch has some small tabs/spaces and whitespace issues and
Hi,
here's a review of the \sf and \ef [num] patch from
http://archives.postgresql.org/message-id/162867791003290927y3ca44051p80e697bc6b19d...@mail.gmail.com
== Formatting ==
The patch has some small tabs/spaces and whitespace issues and it
applies with some offsets, I ran pgindent and
63 matches
Mail list logo