> For the complete documentation index, see [llms.txt](https://dbi-services.gitbook.io/dmk-postgresql-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbi-services.gitbook.io/dmk-postgresql-manual/release_2.2/installation-and-configuration/advanced-configuration.md).

# “Advanced” Configuration

This chapter presents the “standard” configuration of DMK. However, the flexibility of the tool permits customizations and extensions.

## Aliases & Variables Management

The following paragraphs explain how to create your own aliases and variables.

### Declare an alias

Aliases are declared using the following syntax:

```
alias::<name>::[var|novar]_[force|noforce]::<your code>::# comment
```

* \[var|novar]
  * var : creates automatically a variable with the name of the alias
  * novar : doesn’t create the above variable
* \[force|noforce]
  * force : if a command or an alias already exists it’s overwritten
  * noforce: a warning is printed instead of overwriting the existing alias or command

Example of a warning printout

```
2012-06-22_15-31-19::DMK.pm::ComputeConfig ::WARNING ==> $DMK_HOME\\etc\\dmk.conf alias/command "u" is already in use, Please use FORCE option to override it
```

### Declare a variable

Variable are declared using the following syntax

```
var::<name>::[ =|+|-]::[ begin|end|nooption|warn|nowarn]::<your value>::
```

* \[=|+|-]
  * \= : Equal operator
  * * : expand an existing variable
  * : contract, remove element from a variable
* \[begin|end|noption|warn|nowarn]
  * begin/end : works only with the operators \[+|-]
  * nooption|warn : default behave print a warning in case the variable exists
  * nowarn : disable warning and overwrites the variable

Example of a warning printout

```jsx
2012-06-22_18-46-09::DMK.pm::ModifyConfigVar ::WARNING ==> Variable : PG_BASE has been overwritten
2012-06-22_18-46-09::DMK.pm::ModifyConfigVar ::WARNING ==> Old value : /u01/app/postgres
2012-06-22_18-46-09::DMK.pm::ModifyConfigVar ::WARNING ==> New value : "/u01/app/postgres2"
```
