Skip to content

Commit 4ac996e

Browse files
committed
Merge branch 'master' of github.com:NikolayS/PostgresDBA
2 parents dbeeeba + 9db81db commit 4ac996e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ git clone https://github.com/NikolayS/PostgresDBA.git
2727
cd PostgresDBA
2828
```
2929

30+
For convenience, add this shortcut to your `~/.psqlrc` file:
31+
```
32+
\set dba '\\i /path/to/PostgresDBA/start.psql'
33+
```
34+
3035
That's it. Nothing is really needed to be installed.
3136

3237
## Usage
@@ -37,10 +42,7 @@ If you are running psql and Postgres server on the same machine, just launch psq
3742
psql -U <username> <dbname>
3843
```
3944

40-
And type (assuming that you are sitting in the `PostgresDBA` directory):
41-
```
42-
\i ./start.psql
43-
```
45+
And type `:dba <Enter>` in psql. (Or `\i /path/to/PostgresDBA/start.psql` if you haven't added shortcut to your `~/.psqlrc` file).
4446

4547
– it will open interactive menu.
4648

@@ -58,10 +60,7 @@ Then, just launch psql, connecting to port 9432 at localhost:
5860
psql -h localhost -p 9432 -U <username> <dbname>
5961
```
6062

61-
Then you are ready to use it (again, you must be in the project directory when launching psql):
62-
```
63-
\i ./start.psql
64-
```
63+
And type `:dba <Enter>` in psql to launch PostgresDBA.
6564

6665
### Connect to Heroku Postgres
6766
Sitting in the `PostgresDBA` directory on your local machine, run, as usual:
@@ -71,7 +70,7 @@ heroku pg:psql -a <your_project_name>
7170

7271
And then, in psql:
7372
```
74-
\i ./start.psql
73+
:dba
7574
```
7675

7776
## How to Extend (Add More Queries)

0 commit comments

Comments
 (0)