pgrx_pg_sys/
lib.rs

1//LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
2//LICENSE
3//LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
4//LICENSE
5//LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <contact@pgcentral.org>
6//LICENSE
7//LICENSE All rights reserved.
8//LICENSE
9//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
10#[cfg(
11    // no features at all will cause problems
12    not(any(feature = "pg12", feature = "pg13", feature = "pg14", feature = "pg15", feature = "pg16", feature = "pg17")),
13)]
14std::compile_error!("exactly one feature must be provided (pg12, pg13, pg14, pg15, pg16, pg17)");
15
16mod cshim;
17mod cstr;
18mod include;
19mod node;
20mod port;
21pub mod submodules;
22
23#[cfg(feature = "cshim")]
24pub use cshim::*;
25
26pub use cstr::AsPgCStr;
27pub use include::*;
28pub use node::PgNode;
29pub use port::*;
30pub use submodules::*;
31
32mod seal {
33    pub trait Sealed {}
34}
35
36// Hack to fix linker errors that we get under amazonlinux2 on some PG versions
37// due to our wrappers for various system library functions. Should be fairly
38// harmless, but ideally we would not wrap these functions
39// (https://github.com/pgcentralfoundation/pgrx/issues/730).
40#[cfg(target_os = "linux")]
41#[link(name = "resolv")]
42extern "C" {}