duckdb / duckdb/pg_duckdb

could not find ExecCheckRTEPerms() under PG 15.13?

Open
#996 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.2k
Forks
204
PR merge metrics
No merged PRs in 30d

Description

### What happens?

Hi,

When I try to build pg_duckdb master branch on PG 15.12, I encountered the following error:

```
src/pgduckdb_planner.cpp: In function ‘void check_view_perms_recursive(Query*)’:
src/pgduckdb_planner.cpp:157:39: error: ‘ExecCheckRTEPerms’ was not declared in this scope; did you mean ‘ExecCheckRTPerms’?
157 | bool result = ExecCheckRTEPerms(rte);
| ^~~~~~~~~~~~~~~~~
| ExecCheckRTPerms
```

It seems that the `ExecCheckRTEPerms()` is exported by commit [415badc13](https://postgr.es/c/415badc138189a6ecfe3b664dc900af741342258). Before this commit, it was unusable.

Should we fix this, or just document it?

### To Reproduce

```
git clone --branch REL_15_STABLE https://git.postgresql.org/git/postgresql.git
cd postgresql
git checkout -b 15.12 REL_15_12
mkdir build
cd build
../configure \
--prefix=/tmp/pg15.12 \
--enable-tap-tests \
--enable-debug \
--enable-cassert \
--enable-depend \
--enable-dtrace \
--with-icu \
--with-libxml \
--with-libxslt \
--with-lz4 \
--with-openssl \
--with-pam \
--with-python \
CFLAGS='-Wall -Wmissing-prototypes'
make -j $(nproc) -s install
make -j $(nproc) -s -C contrib install
export PATH=/tmp/pg15.12/bin:$PATH
git clone https://github.com/duckdb/pg_duckdb.git
cd pg_duckdb
make
```

### OS:

Ubuntu 24.04, x86_64

### pg_duckdb Version (if built from source use commit hash):

6c43a1ab0305326adf7df37cab667963c38818a2

### Postgres Version (if built from source use commit hash):

15.12 (50d3d22baba63613d1f1406b2ed460dc9b03c3fc)

### Hardware:

_No response_

### Full Name:

Japin Li

### Affiliation:

WwIT

### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a source build

### Did you include all relevant data sets for reproducing the issue?

No - Other reason (please specify in the issue body)

### Did you include all code required to reproduce the issue?

- [x] Yes, I have

### Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

- [ ] Yes, I have

Contributor guide

Open the contributing guide

Research direction

Start with src/pgduckdb_planner.cpp around line 157 and compare the available PostgreSQL 15.12 API with the commit that exported ExecCheckRTEPerms(). Reproduce the build using the PostgreSQL 15.12 commands in the issue, then determine whether the compatibility problem should be fixed or documented; done means pg_duckdb builds successfully on the affected PostgreSQL version or its support limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.