-
Notifications
You must be signed in to change notification settings - Fork 90
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
has_pk(:schema, :table)
Not defined
#287
Comments
All right some time in pgtap.sql.in showed me what is going on. Due to function overloading the only form that automatically sets the description is has_pk( :table ). I was misunderstanding and thought :description was optional in all cases. I now know that the function signatures need to be fully followed for the different forms. |
Oh well perhaps we're missing SELECT has_pk('utility', 'eqpt_model_info'::name); |
Yeah, I could see that being helpful. Would that fill in the missing :desc like SELECT has_pk('eqpt_model_info');? |
Yes, exactly. |
Thanks. |
Postgres 14.2
pgTAP 1.2.0
--Schema and no description
SELECT has_pk('utility', 'eqpt_model_info');
not ok 3 - eqpt_model_info
# Failed test 3: "eqpt_model_info"
--No schema and no description
SELECT has_pk('eqpt_model_info');
ok 3 - Table eqpt_model_info should have a primary key
--Schema and explicit description
SELECT has_pk('utility', 'eqpt_model_info', 'test desc');
ok 3 - test desc
This seems to run counter to the docs:
The text was updated successfully, but these errors were encountered: