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

Pgcentralfoundation updates #1198

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 21 additions & 23 deletions .licensure.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
change_in_place: true
excludes:
- Cargo.toml
- Cargo.lock
- LICENSE
- pgrx-sql-entity-graph/assets/ansi.tmTheme
- ".envrc"
- ".gitignore"
- ".dockerignore"
- "flake\\..*"
- "logo.*"
- "rustfmt.toml"
- ".github/**/*"
- ".cargo/config"
- ".cargo/config.toml"
- "cargo-pgrx/src/templates/*"
- "cargo-pgrx/tests/fixtures/macos-universal-binary"
- ".*\\.control"
- ".*\\.md"
- ".*\\.nix"
Expand All @@ -19,39 +21,35 @@ licenses:
- files: any
ident: MIT
authors:
- name: Technology Concepts & Design, Inc.
email: [email protected]
template: |
- name: PgCentral Foundation, Inc.
email: [email protected]
template: |-
Portions Copyright 2019-2021 ZomboDB, LLC.

Portions Copyright 2021-[year] [name of author]
Portions Copyright 2021-2023 Technology Concepts & Design, Inc.

Portions Copyright 2023-[year] [name of author]

All rights reserved.


Use of this source code is governed by the [ident] license that can be found in the LICENSE file.
comments:
- columns: 120
extensions:
- extensions:
- rs
- c
- h
- sql
trailing_lines: 0
commenter:
type: block
start_block_char: "/*\n"
end_block_char: "\n*/\n"
- columns: 120
extension: html
type: line
comment_char: "//LICENSE"
- extension: sql
trailing_lines: 0
commenter:
type: block
start_block_char: "<!--\n"
end_block_char: "-->"
- columns: 80
extension: any
type: line
comment_char: "--LICENSE"
- extension: any
trailing_lines: 0
commenter:
type: line
comment_char: "#"
trailing_lines: 0

comment_char: "#LICENSE"

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ System Requirements:

If you want to be ready to open a PR, you will want to run
```bash
git clone --branch develop "https://github.com/tcdi/pgrx"
git clone --branch develop "https://github.com/pgcentralfoundation/pgrx"
cd pgrx
```
That will put you in a cloned repository with the *develop* branch opened,
Expand Down Expand Up @@ -98,7 +98,7 @@ Do this *in order*:

## Licensing

You agree that all code you submit in pull requests to https://github.com/tcdi/pgrx/pulls
You agree that all code you submit in pull requests to https://github.com/pgcentralfoundation/pgrx/pulls
is offered according to the MIT License, thus may be freely relicensed and sublicensed,
and that you are satisfied with the existing copyright notice as of opening your PR.

Expand Down
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
#LICENSE
#LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
#LICENSE
#LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
#LICENSE
#LICENSE All rights reserved.
#LICENSE
#LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.

[workspace]
resolver = "2"
members = [
Expand Down
2 changes: 1 addition & 1 deletion DESIGN-DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Perhaps a `serde::Deserialize` implementation that understands the JSONB format

## `cargo-pgrx` is Your Friend

Please see the [cargo-pgrx documentation](https://github.com/tcdi/pgrx/blob/master/cargo-pgrx/README.md)
Please see the [cargo-pgrx documentation](https://github.com/pgcentralfoundation/pgrx/blob/master/cargo-pgrx/README.md)

## `postgrestd` Interactions

Expand Down
2 changes: 1 addition & 1 deletion HOW_TO_CUT_A_PGRX_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```

- go make a PR to `develop` on GitHub
- start "draft new release" on GitHub to ask it to "Generate release notes". Make sure to choose the `develop` branch to get the full set of changes.: https://github.com/tcdi/pgrx/releases/new
- start "draft new release" on GitHub to ask it to "Generate release notes". Make sure to choose the `develop` branch to get the full set of changes.: https://github.com/pgcentralfoundation/pgrx/releases/new
- paste them into the PR you made above
- edit them as best as you can while channeling @workingjubilee's spirit
- request a review
Expand Down
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
MIT License

Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <[email protected]>.
Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
Portions Copyright 2023 PgCentral Foundation, Inc.

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

> Build Postgres Extensions with Rust!

![cargo test --all](https://github.com/tcdi/pgrx/workflows/cargo%20test%20--all/badge.svg)
![cargo test --all](https://github.com/pgcentralfoundation/pgrx/workflows/cargo%20test%20--all/badge.svg)
[![crates.io badge](https://img.shields.io/crates/v/pgrx.svg)](https://crates.io/crates/pgrx)
[![docs.rs badge](https://docs.rs/pgrx/badge.svg)](https://docs.rs/pgrx)
[![Twitter Follow](https://img.shields.io/twitter/follow/zombodb.svg?style=flat)](https://twitter.com/zombodb)
[![Twitter Follow](https://img.shields.io/twitter/follow/pgrx_rs.svg?style=flat)](https://twitter.com/pgrx_rs)
[![Discord Chat](https://img.shields.io/discord/561648697805504526.svg)][Discord]


Expand Down Expand Up @@ -243,8 +243,11 @@ There's probably more than are listed here, but a primary things of note are:

There's a few things on our immediate TODO list

- Automatic extension schema upgrade scripts, based on diffs from a previous git tag and HEAD. Likely, this
will be built into the `cargo-pgrx` subcommand and make use of https://github.com/zombodb/postgres-parser.
- Automatic extension schema upgrade scripts
- Improved unit testing framework
- Better/Safer API for Datum management
- Improved generated bindings organization
- Safely wrap more Postgres internal APIs
- More examples -- especially around memory management and the various derive macros `#[derive(PostgresType/Enum)]`


Expand Down Expand Up @@ -306,7 +309,9 @@ This approach can also be used in extensions to ensure a matching version of `ca

```
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <[email protected]>.
Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
Portions Copyright 2023 PgCentral Foundation, Inc.

All rights reserved.
Use of this source code is governed by the MIT license that can be found in the LICENSE file.
```
Expand Down
2 changes: 1 addition & 1 deletion art/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pgrx-logos (c) by Technology Concepts & Design, Inc.
pgrx-logos (c) by PgCentral Foundation, Inc.

pgrx-logos is licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License.
Expand Down
2 changes: 1 addition & 1 deletion articles/forging-sql-from-rust.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Forging SQL from Rust
<!-- Written 2021-09-20 -->

PostgreSQL offers an extension interface, and it's my belief that Rust is a fantastic language to write extensions for it. [Eric Ridge](https://twitter.com/zombodb) thought so too, and started [`pgrx`](https://github.com/tcdi/pgrx) awhile back. I've been working with him to improve the toolkit, and wanted to share about one of our latest hacks: improving the generation of extension SQL code to interface with Rust.
PostgreSQL offers an extension interface, and it's my belief that Rust is a fantastic language to write extensions for it. [Eric Ridge](https://twitter.com/zombodb) thought so too, and started [`pgrx`](https://github.com/pgcentralfoundation/pgrx/) awhile back. I've been working with him to improve the toolkit, and wanted to share about one of our latest hacks: improving the generation of extension SQL code to interface with Rust.

This post is more on the advanced side, as it assumes knowledge of both Rust and PostgreSQL. We'll approach topics like foreign functions, dynamic linking, procedural macros, and linkers.

Expand Down
6 changes: 3 additions & 3 deletions articles/postgresql-aggregates-with-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,8 @@ Moving-aggregate mode is pretty new to me, and I'm still learning about it! If y

If you're looking for more materials about aggregates, the TimescaleDB folks wrote about aggregates and how they impacted their hyperfunctions in [this article][timescaledb-article-aggregation]. Also, My pal [Tim McNamara][timclicks] wrote about how to implement harmonic and geometric means as aggregates in [this article][timclicks-article-aggregates].

[pgrx]: https://github.com/tcdi/pgrx
[pgrx-issues]: https://github.com/tcdi/pgrx/issues
[pgrx]: https://github.com/pgcentralfoundation/pgrx/
[pgrx-issues]: https://github.com/pgcentralfoundation/pgrx/issues
[pgrx-aggregate-aggregate]: https://docs.rs/pgrx/0.3.0/pgrx/aggregate/trait.Aggregate.html
[pgrx-aggregate-aggregate-finalize]: https://docs.rs/pgrx/0.3.0/pgrx/aggregate/trait.Aggregate.html#tymethod.finalize
[pgrx-aggregate-aggregate-state]: https://docs.rs/pgrx/0.3.0/pgrx/aggregate/trait.Aggregate.html#associatedtype.State
Expand All @@ -930,7 +930,7 @@ If you're looking for more materials about aggregates, the TimescaleDB folks wro
[pgrx::datum::Internal]: https://docs.rs/pgrx/0.3.0/pgrx/datum/struct.Internal.html
[pgrx-pg_aggregate]: https://docs.rs/pgrx/0.3.0/pgrx/attr.pg_aggregate.html
[pgrx-postgrestype]: https://docs.rs/pgrx/0.3.0/pgrx/derive.PostgresType.html
[pgrx-system-requirements]: https://github.com/tcdi/pgrx#system-requirements
[pgrx-system-requirements]: https://github.com/pgcentralfoundation/pgrx/#system-requirements
[plrust]: https://github.com/zombodb/plrust
[rustup-rs]: https://rustup.rs/
[wsl]: https://docs.microsoft.com/en-us/windows/wsl/install
Expand Down
14 changes: 12 additions & 2 deletions cargo-pgrx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
#LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
#LICENSE
#LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
#LICENSE
#LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
#LICENSE
#LICENSE All rights reserved.
#LICENSE
#LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.

[package]
name = "cargo-pgrx"
version = "0.9.7"
authors = ["ZomboDB, LLC <[email protected]>"]
license = "MIT"
description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy"
homepage = "https://github.com/tcdi/pgrx"
repository = "https://github.com/tcdi/pgrx"
homepage = "https://github.com/pgcentralfoundation/pgrx/"
repository = "https://github.com/pgcentralfoundation/pgrx/"
documentation = "https://docs.rs/cargo-pgrx"
categories = ["development-tools::cargo-plugins", "command-line-utilities", "database"]
keywords = ["database", "postgres", "postgresql", "extension"]
Expand Down
2 changes: 1 addition & 1 deletion cargo-pgrx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,5 +849,5 @@ If you are certain that in this case, it is fine, you may set
and the check will be bypassed. However, note that while the check is not
fool-proof, it tries to be fairly liberal in what it allows.

See <https://github.com/tcdi/pgrx/issues/774> and <https://github.com/tcdi/pgrx/pull/873>
See <https://github.com/pgcentralfoundation/pgrx/issues/774> and <https://github.com/pgcentralfoundation/pgrx/pull/873>
for further information.
9 changes: 9 additions & 0 deletions cargo-pgrx/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
fn main() {
println!("cargo:rerun-if-changed=build.rs");
if let Some(minor_version) = rust_minor_version() {
Expand Down
18 changes: 9 additions & 9 deletions cargo-pgrx/src/command/connect.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <[email protected]>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use crate::command::get::get_property;
use crate::command::run::exec_psql;
use crate::command::start::start_postgres;
Expand Down
18 changes: 9 additions & 9 deletions cargo-pgrx/src/command/cross/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2023 Technology Concepts & Design, Inc. <[email protected]>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use crate::CommandExecute;
pub(crate) mod pgrx_target;

Expand Down
19 changes: 10 additions & 9 deletions cargo-pgrx/src/command/cross/pgrx_target.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2023 Technology Concepts & Design, Inc. <[email protected]>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/
//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use crate::CommandExecute;
use eyre::{eyre, Result, WrapErr};
use pgrx_pg_config::PgConfig;
Expand All @@ -21,7 +22,7 @@ use std::{
/// It is optional, but recommended for most cases (any case where the host and
/// target are not identical versions of Debian).
///
/// See the documentation in `CROSS_COMPILE.md` in <https://github.com/tcdi/pgrx>
/// See the documentation in `CROSS_COMPILE.md` in <https://github.com/pgcentralfoundation/pgrx/>
/// for specifics of this file format and how to use the resulting file. Note
/// that this is currently unlikely to be useful on non-Linux targets, as pgrx
/// does not yet support cross-compilation on those targets.
Expand Down
18 changes: 9 additions & 9 deletions cargo-pgrx/src/command/get.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <[email protected]>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use crate::CommandExecute;
use eyre::{eyre, WrapErr};
use std::fs::File;
Expand Down
18 changes: 9 additions & 9 deletions cargo-pgrx/src/command/info.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
Portions Copyright 2019-2021 ZomboDB, LLC.
Portions Copyright 2021-2022 Technology Concepts & Design, Inc. <[email protected]>

All rights reserved.

Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
//LICENSE
//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
//LICENSE
//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
//LICENSE
//LICENSE All rights reserved.
//LICENSE
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use crate::CommandExecute;
use pgrx_pg_config::Pgrx;
use std::borrow::Cow;
Expand Down
Loading