Additional psql requirements
От | Simon Riggs |
---|---|
Тема | Additional psql requirements |
Дата | |
Msg-id | 1216893131.3894.771.camel@ebony.2ndQuadrant обсуждение исходный текст |
Ответы |
Re: Additional psql requirements
|
Список | pgsql-hackers |
I have some suggestions for additional psql features. I'm not planning to work on them myself, just proposing them so others can do so if they agree and wish to do so. * default values for substitution values Need a command to set the default value of a substitution variable, so that it takes a specific value if *not* explicitly set on the command line (or any time prior to setting the default). e.g. \default * access to version number e.g. special variables called PGMINORVERSION (= 8.3.3)PGVERSION (= 8.3) * simple mechanism for conditional execution Similar to #IFDEF e.g. \ifdef (PGVERSION >= 8.3) labelname ... \label labelname (..or simply \endif, in which case I'd like \else as well please) * ability to set substitution variables from command execution Allow the result of an SQL command to be placed in a sub variable e.g. \eval fooinfo 'select info from foo;' * an option to echo an error statement to STDERR -a echoes the SQL statement to STDOUT, so if you separate them you can't match up which SQL had which error The purpose of all of them is to enhance our ability to produce install scripts for various things. Common uses would include * setting a default schema, yet allowing overrides to that * installing languages if not already installed * checking whether other components are already correctly installed * installing things based upon the encoding of the database * skipping certain features if version incorrect * conditional execution whether superuser or not -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
В списке pgsql-hackers по дате отправления: