Re: Maximum password length - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Maximum password length
Date
Msg-id 797097.1599173195@sss.pgh.pa.us
Whole thread Raw
In response to Re: Maximum password length  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Alvaro proposes nearby that we ought to have a src/common/ function
> to slurp an indefinitely long line from a file [1].  If we do that,
> it'd be entirely reasonable to make this code use that.  So maybe
> the right comment is "XXX FIXME later".

Actually, on further thought, the obviously right thing to do here
is to refactor simple_prompt into two functions: the inner one is
basically like fgets except it returns a malloc'd, variable-size
string, and then the outer one does the other stuff simple_prompt needs
such as prompting and opening /dev/tty.  The inner function would
serve initdb's need directly, and it would also have uses elsewhere,
as per the other thread.

I'll go make that happen.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: report expected contrecord size
Next
From: Anastasia Lubennikova
Date:
Subject: Re: history file on replica and double switchover