Re: \prompt for psql

Поиск
Список
Период
Сортировка
От Chad Wagner
Тема Re: \prompt for psql
Дата
Msg-id 81961ff50702170553s5020818dyf88531acf62fec97@mail.gmail.com
обсуждение исходный текст
Ответ на Re: \prompt for psql  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
On 2/17/07, Peter Eisentraut <peter_e@gmx.net> wrote:
Bruce Momjian wrote:
> Seems the consensus was this was a good idea, and not feature-creep.

I wonder whether we want this to read from the console, like the
password prompts, or from stdin.  Not sure which is more useful.

Good point, I know that Oracle's "prompt" feature reads from stdin.  If it were to use stdin, would gets_fromFile be appropriate in place of simple_prompt, or is there other alternatives that would be linked in with psql?



Also on a different issue related to variable substitution, has anyone considered making the variable substitutions automatically "determine" datatype?  It is awfully tricky to understand (I am not sure the specific case below is actually documented?) that something like:

\set foo bar
select * from baz where x = :foo

Will not work, and you have to do:

\set foo '\'bar\''
select * from baz where x = :foo


It would be nice if it assumed a char datatype, or something else.  Should I post this second half on variable substitution to hackers?

В списке pgsql-patches по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: patch adding new regexp functions
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: \prompt for psql