Re: backslash in psql win32

Martin Kanich <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
Hi to all, specialy to Tom :-)

I have the same problem using backslash in mingw build of psql. the 
reason for this "bug" is the use of readline 
$POSTGRES_SOURCE\src\bin\psql\input.c

in function gets_interactive, if USE_READLINE defined the readline 
function would be called:

#ifdef USE_READLINE
...
    if (useReadline)
       /* On some platforms, readline is declared as readline(char *) */
       s = readline((char *) prompt);
    else
       s = gets_basic(prompt);
...
#endif

if I set useReadline to false, it would use gets_basic and this works 
with cmd & winxp & german settings (backslash using alt-gr). I don't 
know what exactly happens in readline() and why it's better than 
gets_basic(), but it shouldn't be used with msys/mingw.

Have a nice day,
Martin

[email protected] wrote:
> 
> Hi to all,
> 
> 
> in win32 psql (startet from cmd.exe) it's not possible to execute any 
> backslash command, because
> the backslash character does not appear . It's not possible to insert 
> special characters !!!
> 
> I changed the console charset to 850, 1252,
> but there is the same problem
> 
> How can I solve this problem ?
> 
> Regards
> 
> tom
> 
> hint : I use postgres-snapshot from 30.03.2004


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.