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

cannot UPDATE or DELETE on fdw foreign table that inherits pgsql table #300

Open
n0099 opened this issue Apr 13, 2024 · 1 comment
Open

Comments

@n0099
Copy link

n0099 commented Apr 13, 2024

CREATE TABLE "base"(i int);
CREATE FOREIGN TABLE IF NOT EXISTS "foreign"()
    INHERITS ("base")
    SERVER mysql
    OPTIONS (dbname 'db', table_name 'remote');
UPDATE "base" SET i = 0 WHERE i = 1;
DELETE FROM "base" WHERE i = 0;

all of them will return

[HV005] ERROR: system attribute "tableoid" can't be fetched from remote relation

but

INSERT INTO "base"(i) VALUES (1);
UPDATE ONLY "base" SET i = 0 WHERE i = 1;
DELETE FROM ONLY "base" WHERE i = 0;

works fine and will only INSERT/UPDATE/DELETEed on the base table not to the foreign one.

@surajkharage19
Copy link

Hi @n0099,

Thanks for reporting this issue. I can reproduce the same at my end.
We will check the feasibility of fixing this at our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants