You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,11 @@ An alternative is to use [BashSupport Pro](https://plugins.jetbrains.com/plugin/
27
27
Additionally, our [Bats](https://github.com/bats-core/bats-core) tests assume that you have a `doltgresql` (not `doltgres`) binary on your PATH.
28
28
For Windows users, this means that the binary should _not_ end with the `.exe` file extension.
29
29
Remember to recompile the executable on your PATH whenever you want to re-test any [Bats](https://github.com/bats-core/bats-core) tests.
30
+
9.**Change the data directory**: This is optional but recommended.
31
+
By default, we create databases within the `~/doltgres/databases` directory.
32
+
For developmental purposes, you may want to change this behavior. You have two options:
33
+
1. Set the `DOLTGRES_DATA_DIR` environment variable to a different directory. A value of `.` causes DoltgreSQL to use the current directory as the data directory, so you can have multiple data directories simply by running the program in different directories. This behavior is more consistent with [Dolt's](https://github.com/dolthub/dolt) behavior. This is the recommended option for development.
34
+
2. Specify the directory in the `--data-dir` argument. This overrides the environment variable if it is present.
Copy file name to clipboardExpand all lines: README.md
+11-24Lines changed: 11 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,46 +35,38 @@ If you are interested in using Doltgres now or in the future, please:
35
35
*[Try Doltgres](#getting-started)
36
36
* Create [issues](https://github.com/dolthub/doltgresql/issues) if you find bugs
37
37
* Create [issues](https://github.com/dolthub/doltgresql/issues) for missing functionality you want
38
-
* Contribute Code for features you want (see [Building From Source](#building-from-source))
39
-
40
-
Contribution Guide coming soon.
38
+
* Contribute code for features you want (see the [Contribution Guide](https://github.com/dolthub/doltgresql/blob/main/CONTRIBUTING.md))
41
39
42
40
# Getting Started
43
41
44
42
1. Download the latest release of `doltgres`
45
43
46
44
2. Put `doltgres` on your `PATH`
47
45
48
-
3. Navigate to a directory you want your database data stored (ie. `~/doltgresql`).
49
-
```bash
50
-
$ mkdir ~/doltgresql
51
-
$ cd~/doltgresql
52
-
```
53
-
54
-
4. Run `doltgres`. This will create a `doltgres` user and a `doltgres` database.
46
+
3. Run `doltgres`. This will create a `doltgres` user and a `doltgres` database in `~/doltgres/databases` (add the `--data-dir` argument or change the `DOLTGRES_DATA_DIR` environment variable to use a different directory).
55
47
```bash
56
48
$ doltgres
57
49
Successfully initialized dolt data repository.
58
50
Starting server with Config HP="localhost:5432"|T="28800000"|R="false"|L="info"|S="/tmp/mysql.sock"
59
51
```
60
52
61
-
5. Make sure you have Postgres version 15 or higher installed. I used Homebrew to install Postgres on my Mac.
53
+
4. Make sure you have Postgres version 15 or higher installed. I used Homebrew to install Postgres on my Mac.
62
54
This requires I manually add `/opt/homebrew/opt/postgresql@15/bin` to my path. On Postgres version 14 or lower,
63
-
`\` commands (ie. `\d`, `\l`) do not work with Doltgres.
55
+
`\` commands (ie. `\d`, `\l`) do not yet work with Doltgres.
6. Open a new terminal. Connect with the following command: `psql -h localhost -U doltgres`. This will connect to the `doltgres` database with the `doltgres` user.
60
+
5. Open a new terminal. Connect with the following command: `psql -h localhost -U doltgres`. This will connect to the `doltgres` database with the `doltgres` user.
69
61
```bash
70
-
$ psql -h 127.0.0.1 -U doltgres
62
+
$ psql -h 127.0.0.1 -U doltgres
71
63
psql (15.4 (Homebrew), server 15.0)
72
64
Type "help"for help.
73
65
74
66
doltgres=>
75
67
```
76
68
77
-
7. Create a `getting_started` database. Create the `getting_started` example tables.
69
+
6. Create a `getting_started` database. Create the `getting_started` example tables.
@@ -157,17 +149,12 @@ getting_started=> select * from dolt_log;
157
149
(2 rows)
158
150
```
159
151
160
-
10. Continue with [Dolt Getting Started](https://docs.dolthub.com/introduction/getting-started/database#insert-some-data)
152
+
9. Continue with [Dolt Getting Started](https://docs.dolthub.com/introduction/getting-started/database#insert-some-data)
161
153
to test out more Doltgres versioning functionality.
162
154
163
155
# Building From Source
164
156
165
-
Due to the rapid pace of development at this early stage, building from source will guarantee that you're always working
166
-
with the latest improvement and features.
167
-
168
-
1. Clone the repository to your local drive
169
-
2. Run `./postgres/parser/build.sh` to generate the parser
170
-
3. Run `go build .` in the root directory
157
+
Please follow the [Contributor's Guide](https://github.com/dolthub/doltgresql/blob/main/CONTRIBUTING.md#getting-set-up) to learn how to build from source.
{{.EmphasisLeft}}data_dir{{.EmphasisRight}}: A directory where the server will load dolt databases to serve, and create new ones. Defaults to the current directory.
60
+
{{.EmphasisLeft}}data_dir{{.EmphasisRight}}: A directory where the server will load dolt databases to serve, and create new ones. Defaults to the DOLTGRES_DATA_DIR environment variable, or {{.EmphasisLeft}}~/doltgres/databases{{.EmphasisRight}}.
56
61
57
62
{{.EmphasisLeft}}cfg_dir{{.EmphasisRight}}: A directory where the server will load and store non-database configuration data, such as permission information. Defaults {{.EmphasisLeft}}$data_dir/.doltcfg{{.EmphasisRight}}.
0 commit comments