Skip to content

[PG-1695] Remove extra word in error message for existing key #449

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contrib/pg_tde/expected/key_provider.out
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ SELECT pg_tde_create_key_using_database_key_provider('existing-key','file-provid
(1 row)

SELECT pg_tde_create_key_using_database_key_provider('existing-key','file-provider');
ERROR: cannot to create key "existing-key" because it already exists
ERROR: cannot create key "existing-key" because it already exists
SELECT pg_tde_create_key_using_global_key_provider('existing-key','file-keyring');
ERROR: cannot to create key "existing-key" because it already exists
ERROR: cannot create key "existing-key" because it already exists
-- Setting principal key fails if key does not exist
SELECT pg_tde_set_default_key_using_global_key_provider('not-existing', 'file-keyring');
ERROR: key "not-existing" does not exist
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_tde/src/catalog/tde_principal_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ pg_tde_create_principal_key_internal(Oid providerOid,
if (key_info != NULL)
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("cannot to create key \"%s\" because it already exists", key_name));
errmsg("cannot create key \"%s\" because it already exists", key_name));

key_info = KeyringGenerateNewKeyAndStore(provider, key_name, PRINCIPAL_KEY_LEN);

Expand Down