Re: psql variables
От | Peter Eisentraut |
---|---|
Тема | Re: psql variables |
Дата | |
Msg-id | 200402091029.53881.peter_e@gmx.net обсуждение исходный текст |
Ответ на | psql variables (Neil Conway <neilc@samurai.com>) |
Ответы |
Re: psql variables
|
Список | pgsql-hackers |
Neil Conway wrote: > Recently, I was surprised to learn that psql variables are case > sensitive. like shell variables > Furthermore, there is no error when one attempts to '\set' > a non-existent variable Well, how are you going to set a new variable if not this way? > One possible justification for this behavior is that it allows a > simple naming convention to distinguish user-defined variables from > psql-internal variables. Is that the case? Yes, upper-case names are reserved. This is documented. > While we're on the subject, there are some other design choices in > this area that seem a bit unfortunate. For example, we don't error > out on references to undefined variables like shell variables > Also, the user can go ahead and overwrite > the value of built-in variables like HOST and PORT like shell variables
В списке pgsql-hackers по дате отправления: