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?