Skip site navigation (1) Skip section navigation (2)

Re: psql: default base and password reading

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, Bradley McLean <brad(at)bradm(dot)net>, Adam Osuchowski <adwol(at)polsl(dot)gliwice(dot)pl>
Subject: Re: psql: default base and password reading
Date: 2001-10-13 16:14:33
Message-ID: 200110131614.f9DGEX801100@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> On second thought --- are we creating any portability problems if we
> >> assume /dev/tty exists?  In particular, what about the Windows port
> >> of psql?  Will it still work?
> 
> > I am sure cygwin takes care of this.
> 
> Please recall that we have a *native* port of psql ... cygwin doesn't
> help.

Ewe!  

The only other mention of /dev/tty I see is in psql/command.c:

    /* \s save history in a file or show it on the screen */
    else if (strcmp(cmd, "s") == 0)
    {
        char       *fname = scan_option(&string, OT_NORMAL, NULL, true);

        success = saveHistory(fname ? fname : "/dev/tty");

        if (success && !quiet && fname)
            printf(gettext("Wrote history to %s.\n"), fname);
        free(fname);
    }

I can easily #ifdef around the /dev/tty open.  Can someone comment on
what opening /dev/tty does on a Win32 machines without cygwin?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-10-13 17:14:32
Subject: Re: psql: default base and password reading
Previous:From: Tom LaneDate: 2001-10-13 16:10:32
Subject: Re: psql: default base and password reading

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group