Re: [HACKERS] psql \e broken again - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: [HACKERS] psql \e broken again |
Date | |
Msg-id | 200411301900.iAUJ0xl29966@candle.pha.pa.us Whole thread Raw |
List | pgsql-patches |
I have made similar adjustments to SHELL like we did with EDITOR --- patch attached. I quote only for Win32. --------------------------------------------------------------------------- Peter Eisentraut wrote: > A remember specifically that I somewhat recently fixed psql to accept > editors with arguments, say EDITOR="pico -t". This was apparently > broken again during some Windows-related reshuffling. It now takes the > editor as one quoted string rather than possibly several shell tokens. > Could this please be fixed? > > -- > Peter Eisentraut > http://developer.postgresql.org/~petere/ > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/bin/psql/command.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/command.c,v retrieving revision 1.135 diff -c -c -r1.135 command.c *** src/bin/psql/command.c 15 Nov 2004 23:15:12 -0000 1.135 --- src/bin/psql/command.c 30 Nov 2004 18:52:18 -0000 *************** *** 1563,1572 **** sys = pg_malloc(strlen(shellName) + 16); sprintf(sys, #ifndef WIN32 ! "exec " ! #endif "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); result = system(sys); free(sys); } --- 1563,1574 ---- sys = pg_malloc(strlen(shellName) + 16); sprintf(sys, + /* See EDITOR handling comment for an explaination */ #ifndef WIN32 ! "exec %s", shellName); ! #else "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); + #endif result = system(sys); free(sys); } Index: src/bin/psql/command.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/command.c,v retrieving revision 1.135 diff -c -c -r1.135 command.c *** src/bin/psql/command.c 15 Nov 2004 23:15:12 -0000 1.135 --- src/bin/psql/command.c 30 Nov 2004 18:52:18 -0000 *************** *** 1563,1572 **** sys = pg_malloc(strlen(shellName) + 16); sprintf(sys, #ifndef WIN32 ! "exec " ! #endif "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); result = system(sys); free(sys); } --- 1563,1574 ---- sys = pg_malloc(strlen(shellName) + 16); sprintf(sys, + /* See EDITOR handling comment for an explaination */ #ifndef WIN32 ! "exec %s", shellName); ! #else "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); + #endif result = system(sys); free(sys); }
pgsql-patches by date: