Skip to content

Support FK tests on temp tables #109

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

Closed
wants to merge 6 commits into from

Conversation

decibel
Copy link
Collaborator

@decibel decibel commented Aug 3, 2016

If you're testing code that deals with table structure you might need to create temporary objects, and the easiest way to do that is to put them in pg_temp. The existing fk_ok() failed in that case because it only recognized the numbered temp schema (ie: pg_temp_2).

This adds special support for when the user specifies pg_temp as one of the schemas.

BTW, you might want to merge this as a squash commit.

@theory
Copy link
Owner

theory commented Aug 11, 2016

Should pg_all_foreign_keys be updated to show temp tables, instead, perhaps with a boolean column to indicate if a table is a temp table?

@decibel
Copy link
Collaborator Author

decibel commented Mar 18, 2018

I don't think it'd help much, since fk_ok would still need to special-case 'pg_temp'.

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

Successfully merging this pull request may close these issues.

2 participants