Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ repository = "https://github.com/pgdogdev/pg_raw_parse"
# Enables compile-time checks to verify that our enums are actually layout
# identical to the C structures we're casting from. Requires a nightly compiler
field_offset_assertions = []
postgres-regress = ["dep:include_dir"]

[dependencies]
generativity = "1.2.1"
libc = "0.2.186"
thiserror = "2.0.18"
include_dir = { version = "0.7", optional = true }

[build-dependencies]
bindgen = "0.72.1"
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pub use crate::owned::Owned;
/// PostgreSQL version number whose parser sources are used by this crate.
pub const POSTGRES_VERSION_NUM: u32 = raw::PG_VERSION_NUM;

#[cfg(feature = "postgres-regress")]
pub static POSTGRES_REGRESS: include_dir::Dir<'static> =
include_dir::include_dir!("$CARGO_MANIFEST_DIR/libpg_query/test/sql/postgres_regress");

/// Returns the PostgreSQL version whose parser sources are used by this crate.
pub fn postgres_version() -> &'static str {
CStr::from_bytes_with_nul(raw::PG_VERSION)
Expand Down
Loading