Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand readme #1433

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,25 @@ scl enable devtoolset-7 bash
## Getting Started


First install the `cargo-pgrx` sub-command and initialize the development environment:
First install the `cargo-pgrx` sub-command.

```bash
cargo install --locked cargo-pgrx
```

**Important:** `cargo-pgrx` **must** be built using the same compiler as you'll use to build the rest of your project. Every time you update your Rust toolchain you have to also manually reinstall `cargo-pgrx`. See [Upgrading](#Upgrading), below.

Once `cargo-pgrx` is ready you can initialize the "PGRX Home" directory:

```bash
cargo pgrx init
```

The `init` command downloads currently supported PostgreSQL versions, compiles them to `~/.pgrx/`, and runs `initdb`. It's also possible to use an existing (user-writable) PostgreSQL install, or install a subset of versions, see the [`README.md` of `cargo-pgrx` for details](cargo-pgrx/README.md#first-time-initialization).
The `init` command downloads all currently supported PostgreSQL versions, compiles them to `~/.pgrx/`, and runs `initdb`.

It's also possible to use an existing (user-writable) PostgreSQL install, or install a subset of versions, see the [`README.md` of `cargo-pgrx` for details](cargo-pgrx/README.md#first-time-initialization).

Now you can begin work on a specific pgrx extension:

```bash
cargo pgrx new my_extension
Expand Down Expand Up @@ -159,7 +170,7 @@ As new Postgres versions are supported by `pgrx`, you can re-run the `pgrx init`
cargo pgrx init
```

### Mapping of Postgres types to Rust
## Mapping of Postgres types to Rust

| Postgres Type | Rust Type (as `Option<T>`) |
|----------------------------|---------------------------------------------------------|
Expand Down
Loading