Commit 91b87d6
improve pg_magic_func (pgcentralfoundation#2088)
Based on pgcentralfoundation#2087, to make CI happy.
This patch
1. changes the syntax from `pgrx::pg_module_magic!(c"NAME", c"VERSION")`
to `pgrx::pg_module_magic!(name = c"NAME", version = c"VERSION")`
2. allows `pgrx::pg_module_magic!(name, version)` to fill the name and
version by package name and version in magic struct
3. allows `pgrx::pg_module_magic!(name, version = c"1.0.0")` to fill the
name by package name and the version by specifying one in magic struct
4. allows `pgrx::pg_module_magic!()` to fill the name and version with
null pointers in magic struct
5. checks type of `name` and `version`, in order to avoid misuse since
`str::as_ptr` also exists1 parent 0000948 commit 91b87d6
43 files changed
Lines changed: 176 additions & 226 deletions
File tree
- cargo-pgrx/src
- command
- templates
- pgrx-examples
- aggregate/src
- arrays/src
- bad_ideas/src
- bgworker/src
- bytea/src
- composite_type/src
- custom_libname/src
- custom_sql/src
- custom_types/src
- datetime/src
- errors/src
- nostd/src
- numeric/src
- operators/src
- pgtrybuilder/src
- range/src
- schemas/src
- shmem/src
- spi_srf/src
- spi/src
- srf/src
- strings/src
- triggers/src
- versioned_custom_libname_so/src
- versioned_so/src
- wal_decoder/src
- pgrx-macros/src
- pgrx-pg-sys/src
- pgrx-tests
- src
- tests
- tests/compile-fail
- pgrx/src
- datum
- spi
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments