@@ -12,11 +12,11 @@ One way to install `pgdd` is to install from source by cloning this repository.
1212
1313### Prereqs
1414
15- Pgx and its dependencies are the main prereq for PgDD.
15+ pgrx and its dependencies are the main prereq for PgDD.
1616Install Prereqs and ensure PostgreSQL dev tools are installed.
1717
18- > See the [ Cargo PGX ] ( https://github.com/zombodb/pgx /tree/master/cargo-pgx )
19- documentation for more information on using pgx .
18+ > See the [ Cargo pgrx ] ( https://github.com/zombodb/pgrx /tree/master/cargo-pgrx )
19+ documentation for more information on using pgrx .
2020
2121
2222``` bash
@@ -25,18 +25,18 @@ sudo apt install postgresql-server-dev-all libreadline-dev zlib1g-dev curl \
2525 graphviz
2626```
2727
28- [ Install Rust] ( https://www.rust-lang.org/tools/install ) and Pgx .
28+ [ Install Rust] ( https://www.rust-lang.org/tools/install ) and pgrx .
2929
3030``` bash
3131curl https://sh.rustup.rs -sSf | sh -s -- -y
3232source $HOME /.cargo/env
3333```
3434
35- Install ` cargo-pgx ` regularly (see dev steps below for non-standard install).
35+ Install ` cargo-pgrx ` regularly (see dev steps below for non-standard install).
3636
3737
3838``` bash
39- cargo install --locked cargo-pgx
39+ cargo install --locked cargo-pgrx
4040```
4141
4242
@@ -47,13 +47,13 @@ cargo install cargo-deb
4747```
4848
4949
50- Initialize pgx . Need to run this after install AND occasionally to get updates
51- to Postgres versions or glibc updates. Not typically required to follow pgx
50+ Initialize pgrx . Need to run this after install AND occasionally to get updates
51+ to Postgres versions or glibc updates. Not typically required to follow pgrx
5252developments.
5353
5454
5555``` bash
56- cargo pgx init
56+ cargo pgrx init
5757```
5858
5959
@@ -74,7 +74,7 @@ changes the last two digits of the port!
7474
7575
7676``` bash
77- cargo pgx run pg14
77+ cargo pgrx run pg14
7878```
7979
8080The output starts with something similar to:
@@ -87,19 +87,19 @@ building extension with features `pg14`
8787
8888
8989``` bash
90- Copying control file to ` /home/username/.pgx /14.0/pgx -install/share/postgresql/extension/pgdd.control`
91- Copying shared library to ` /home/username/.pgx /14.0/pgx -install/lib/postgresql/pgdd.so`
90+ Copying control file to ` /home/username/.pgrx /14.0/pgrx -install/share/postgresql/extension/pgdd.control`
91+ Copying shared library to ` /home/username/.pgrx /14.0/pgrx -install/lib/postgresql/pgdd.so`
9292 Building SQL generator with features ` pg14`
9393" cargo" " build" " --bin" " sql-generator" " --features" " pg14" " --no-default-features"
9494 Compiling pgdd v0.4.0 (/home/username/git/pgdd)
9595 Finished dev [unoptimized + debuginfo] target(s) in 13.84s
9696 Discovering SQL entities
9797 Discovered 9 SQL entities: 0 schemas (0 unique), 6 functions, 0 types, 0 enums, 3 sqls, 0 ords, 0 hashes
9898running SQL generator with features ` pg14`
99- " cargo" " run" " --bin" " sql-generator" " --features" " pg14" " --no-default-features" " --" " --sql" " /home/username/.pgx /14.0/pgx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql"
99+ " cargo" " run" " --bin" " sql-generator" " --features" " pg14" " --no-default-features" " --" " --sql" " /home/username/.pgrx /14.0/pgrx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql"
100100 Finished dev [unoptimized + debuginfo] target(s) in 0.06s
101- Running ` target/debug/sql-generator --sql /home/username/.pgx /14.0/pgx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql`
102- Copying extension schema file to ` /home/username/.pgx /14.0/pgx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql`
101+ Running ` target/debug/sql-generator --sql /home/username/.pgrx /14.0/pgrx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql`
102+ Copying extension schema file to ` /home/username/.pgrx /14.0/pgrx -install/share/postgresql/extension/pgdd--0.4.1-dev.sql`
103103 Finished installing pgdd
104104 Starting Postgres v14 on port 28814
105105 Re-using existing database pgdd
@@ -111,13 +111,13 @@ In the test instance of psql, create the extension in database.
111111CREATE EXTENSION pgdd;
112112```
113113
114- > Note: When you see "Re-using existing database pgdd" your previous installed version of ` pgdd ` will be available. To ensure you are working with the latest version of the ` pgdd ` extension you must drop/create the extension, quit the psql shell, and re-run the ` cargo pgx run ` command.
114+ > Note: When you see "Re-using existing database pgdd" your previous installed version of ` pgdd ` will be available. To ensure you are working with the latest version of the ` pgdd ` extension you must drop/create the extension, quit the psql shell, and re-run the ` cargo pgrx run ` command.
115115
116116
117117## Build binary packages
118118
119119Debian/Ubuntu Bionic binaries are available for 0.4.0
120- (first [ pgx ] ( https://github.com/tcdi/pgx ) version)
120+ (first [ pgrx ] ( https://github.com/tcdi/pgrx ) version)
121121and later. More distributions will likely have binaries available in the future.
122122
123123
@@ -134,62 +134,28 @@ During development some versions may be copied to the `./standalone/` directory.
134134cp ./target/artifacts/* ./standalone/
135135```
136136
137- ## Pgx Generate graphviz
137+ ## pgrx Generate graphviz
138138
139139``` bash
140- cargo pgx schema -d pgdd.dot
140+ cargo pgrx schema -d pgdd.dot
141141dot -Goverlap=prism -Gspline=ortho -Tjpg pgdd.dot > pgdd.jpg
142142```
143143
144- ![ pgx dependencies for pgdd] ( pgdd.jpg )
144+ ![ pgrx dependencies for pgdd] ( pgdd.jpg )
145145
146146
147147## Non-standard dev
148148
149- When working against Pgx installed from a non-tagged branch, install pgx using:
149+ When working against pgrx installed from a non-tagged branch, install pgrx using:
150150
151151``` bash
152- cargo install --locked --force --git " https://github.com/tcdi/pgx " \
152+ cargo install --locked --force --git " https://github.com/tcdi/pgrx " \
153153 --branch " develop" \
154- " cargo-pgx "
154+ " cargo-pgrx "
155155```
156156
157- Or a beta branch
158157
159- ``` bash
160- cargo install --locked --force cargo-pgx --version 0.2.0-beta.4
161- ```
162-
163- Changes to ` Cargo.toml ` required in ` [lib] ` and ` [dependencies] ` sections.
164-
165-
166- ``` toml
167- [lib ]
168- # rlib added to build against repo instead of crate (I think)
169- crate-type = [" cdylib" , " rlib" ]
170- # crate-type = ["cdylib"]
171- ```
172-
173-
174- ``` toml
175- [dependencies ]
176-
177- pgx = { git = " https://github.com/tcdi/pgx" , branch = " oh-no-type-resolution" }
178- pgx-macros = { git = " https://github.com/tcdi/pgx" , branch = " develop" }
179- # pgx = "0.1.21"
180- # pgx-macros = "0.1.21"
181-
182- # Won't be needed in final version (hopefully!)
183- pgx-utils = { git = " https://github.com/tcdi/pgx" , branch = " develop" }
184-
185- [dev-dependencies ]
186- pgx-tests = { git = " https://github.com/tcdi/pgx" , branch = " develop" }
187- # pgx-tests = "0.1.21"
188- ```
189-
190-
191-
192- The following command can be used to force pgx to overwrite the configs it needs to
158+ The following command can be used to force pgrx to overwrite the configs it needs to
193159for various dev related changes.
194160
195161Clean things out.
@@ -209,28 +175,28 @@ Force build the schema.
209175
210176
211177``` bash
212- cargo pgx schema -f
178+ cargo pgrx schema -f
213179```
214180
215181
216182## Non-standard In Docker
217183
218- If testing this extension against non-standard pgx install, update the
184+ If testing this extension against non-standard pgrx install, update the
219185Dockerfile to install from the specific branch.
220186
221187Change
222188
223189``` bash
224190RUN /bin/bash rustup.sh -y \
225- && cargo install --locked cargo-pgx
191+ && cargo install --locked cargo-pgrx
226192```
227193
228194To
229195
230196``` bash
231197RUN /bin/bash rustup.sh -y \
232- && cargo install --locked --force --git " https://github.com/tcdi/pgx " \
198+ && cargo install --locked --force --git " https://github.com/tcdi/pgrx " \
233199 --branch " develop" \
234- " cargo-pgx "
200+ " cargo-pgrx "
235201```
236202
0 commit comments