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

NodeID as function arg: doesn't work with relational polymorphic type #468

Closed
benjie opened this issue Aug 11, 2023 · 1 comment · Fixed by #488
Closed

NodeID as function arg: doesn't work with relational polymorphic type #468

benjie opened this issue Aug 11, 2023 · 1 comment · Fixed by #488
Labels
Milestone

Comments

@benjie
Copy link
Member

benjie commented Aug 11, 2023

Context: https://discord.com/channels/489127045289476126/498852330754801666/1139080641795862609

Reported by @sgrove

CREATE FUNCTION public.super_custom_delete_block_by_id(nodeId public.block)
RETURNS public.block
AS $$
  DELETE FROM public.block
  WHERE block.id = nodeId.id
  RETURNING *;
$$ LANGUAGE sql VOLATILE STRICT SECURITY DEFINER;

comment on function public.super_custom_delete_block_by_id(block_id public.block) is E'@arg0variant nodeId';

block here is an @interface mode:relational type; so the nodeId argument should accept ids from any of the concrete types of this, and then pass through the root table record. Currently I'm not sure what it does (need to try and reproduce it) but I'm guessing it fails to find a suitable handler for the type and thus gives up.

@benjie
Copy link
Member Author

benjie commented Aug 11, 2023

Solve #473 first!

@benjie benjie added this to V5.0.0 Oct 4, 2023
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.0.0 Oct 4, 2023
@benjie benjie moved this from 🌳 Triage to ✅ Done in V5.0.0 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant