![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
More details and the, in my opinion, somewhat reckless response by one of the Debian postgresql package maintainers are available at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285844 |
#3
| |||
| |||
|
|
Still, it looks like it would be relatively easy to suppress evaluation of backticked arguments once we recognize that the backslash command has failed, and I would say that that's a reasonable change to make on the principle of least surprise. |
#4
| |||
| |||
|
|
On looking at this further, I wonder if it wouldn't be a good idea for a failed backslash command to cause the rest of the input line to be discarded. |
#5
| |||
| |||
|
|
I wrote: Still, it looks like it would be relatively easy to suppress evaluation of backticked arguments once we recognize that the backslash command has failed, and I would say that that's a reasonable change to make on the principle of least surprise. On looking at this further, I wonder if it wouldn't be a good idea for a failed backslash command to cause the rest of the input line to be discarded. In the existing coding, if we find another backslash we'll try to execute another backslash command, but that seems rather considerably likely to be the Wrong Thing instead of the Right Thing. |
#6
| |||
| |||
|
|
Tom, would you show an example of the change in behavior? I didn't understand the details. |
#7
| |||
| |||
|
|
Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes: Tom, would you show an example of the change in behavior? I didn't understand the details. In CVS tip: regression=# \N `touch wrong1` \i `touch wrong2` Invalid command \N. Try \? for help. : No such file or directory regression=# Both wrong1 and wrong2 are created. Thomer originally asserted that wrong1 shouldn't have been created, ie, we shouldn't have tried to evaluate the backticked "argument" to \N. I further suggest that it's not a good idea to even try to process the \i command. I'd prefer to see something like regression=# \N `touch wrong1` \i `touch wrong2` Invalid command \N. Try \? for help. Ignoring junk "`touch wrong1` \i `touch wrong2`" regression=# |
#8
| |||
| |||
|
|
So if a backslash command fails we discard the rest of the line? |
|
How did user data ever get to psql in this way? |
![]() |
| Thread Tools | |
| Display Modes | |
| |