Skip to content

Investigate switching \i to \ir throughout pgxntoolΒ #110

Description

@jnasbyupgrade

πŸ€– (Claude)

`\ir` (include relative β€” resolves the included path relative to the including file's own directory, not the caller's cwd) was added in PostgreSQL 9.2 (2012). pgxntool's declared minimum PostgreSQL version (`META.in.json`, the template it ships for consuming extensions) is 9.5.0 β€” newer than 9.2 β€” so `\ir` should be safe to use anywhere pgxntool currently claims support.

`\i` is still used in a few places in this repo (e.g. `test/pgxntool/setup.sql`, `test/pgxntool/tap_setup.sql`, and examples in `README.asc`), presumably because `\ir` didn't exist when they were originally written. Worth investigating switching these to `\ir` by default, since it resolves relative to the including file rather than the caller's cwd β€” the more robust default for anything that isn't deliberately relying on cwd-relative resolution. If there's a place that genuinely needs `\i`'s cwd-relative behavior, that should get an explicit comment explaining why; everywhere else could just default to `\ir` without needing a comment justifying it, once it's the norm.

Flagging as an investigation, not a confirmed bug β€” there may be a reason some of these stayed as `\i` that isn't obvious from the current code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions