Skip to content
Discussion options

You must be logged in to vote

Hey @sandbox-apps,

Edit: an array was the solution here, see below.

For your case, I think you could create a trigger that enforces the constraint(does a raise foreign_key_violation inside).

Hard to come with a snippet without a sample schema, but there's an example here(see the check_role_exists() trigger function).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sandbox-apps
Comment options

@steve-chavez
Comment options

@sandbox-apps
Comment options

Answer selected by steve-chavez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants