-
Notifications
You must be signed in to change notification settings - Fork 557
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or requestneeds more infoNeeds more information from the OP. If no info is provided, it will be marked as stale and closed.Needs more information from the OP. If no info is provided, it will be marked as stale and closed.
Description
Description
I want insert({...}).select('id') to require INSERT, but not require SELECT policy. I want to have a user that can INSERT a record and some corresponding stuff with it. I don't want them to be able to, in general, SELECT a record, but I need to get back at least the id of the thing that was INSERTed so that I can add join things.
Suggested solution
If RETURNING is used, it should allow insert({...}).select('id') to work without having SELECT permissions on the INSERTed row.
Alternative
The workaround is to create an id in the client, but I don't like that as much as relying on the DB for such things.
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds more infoNeeds more information from the OP. If no info is provided, it will be marked as stale and closed.Needs more information from the OP. If no info is provided, it will be marked as stale and closed.