psql password prompt

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Scott Williams <scott(at)james(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: psql password prompt
Date: 2000-02-16 23:36:15
Message-ID: 200002162336.SAA18813@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter E. can you look at this? I see simple prompt doing:

fputs(prompt, stdout);

which I think should be stderr. Peter, can you check on those?

>
> Does it still make sense to send the following to
> pgsql-bugs(at)postgresql(dot)org?
>
> - Scott Williams
>
>
> Subject: pg_dump -u prompts for username/password on stdout rather than stderr
> ----------------------------------------------------------------------
> Your name : Scott Williams
> Your email address : Scott(at)James(dot)com
>
>
> System Configuration
> ---------------------
> Architecture (example: Intel Pentium) : i586
> Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.10
> PostgreSQL version (example: PostgreSQL-6.5.3): PostgreSQL-6.5.3
> Compiler used (example: gcc 2.8.0) : egcs-2.91.66 19990314 (egcs-1.1.2 release)
>
>
> Please enter a FULL description of your problem:
> ------------------------------------------------
>
> When running pg_dump with the -u switch, it prompts me on stdout for
> the username and password, rather than stderr. Unfortunately this
> causes a bit of confusion when doing
>
> pg_dump -o -u some_db >dump_file
>
> since it puts the prompt in the dump_file rather than to the screen,
> making dump_file syntacticly invalid. Of course the work around is
> to use the `-f' flag. However, redirecting pg_dump's stdout to a
> file using `>' is what's shown under `Usage' in the pg_dump chapter
> of the `PostgreSQL User's Guide'
>
>
> Please describe a way to repeat the problem. Please try to provide a
> concise reproducible example, if at all possible:
> ----------------------------------------------------------------------
>
> If you know how this problem might be fixed, list the solution below:
> ---------------------------------------------------------------------
>
>
>

--
Bruce Momjian | http://www.op.net/~candle
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-02-16 23:51:21 RE: [HACKERS] Solution for LIMIT cost estimation
Previous Message Peter Eisentraut 2000-02-16 23:27:26 Maximum columns for optimum performance (fwd)