ereport(ERROR,
(errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
errmsg("password or GSSAPI delegated credentials required"),
- errdetail("Non-superusers may only connect using credentials they provide, eg: password in connection string or delegated GSSAPI credentials"),
+ errdetail("Non-superusers may only connect using credentials they provide, eg: password in connection string or delegated GSSAPI credentials."),
errhint("Ensure provided credentials match target server's authentication method.")));
}
-- error: too short
ALTER USER regress_passwordcheck_user1 PASSWORD 'tooshrt';
ERROR: password is too short
-DETAIL: password must be at least "passwordcheck.min_password_length" (8) bytes long
+DETAIL: Password must be at least "passwordcheck.min_password_length" (8) bytes long.
-- ok
SET passwordcheck.min_password_length = 6;
ALTER USER regress_passwordcheck_user1 PASSWORD 'v_shrt';
-- error: too short
ALTER USER regress_passwordcheck_user1 PASSWORD 'tooshrt';
ERROR: password is too short
-DETAIL: password must be at least "passwordcheck.min_password_length" (8) bytes long
+DETAIL: Password must be at least "passwordcheck.min_password_length" (8) bytes long.
-- ok
SET passwordcheck.min_password_length = 6;
ALTER USER regress_passwordcheck_user1 PASSWORD 'v_shrt';
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("password is too short"),
- errdetail("password must be at least \"passwordcheck.min_password_length\" (%d) bytes long",
+ errdetail("Password must be at least \"passwordcheck.min_password_length\" (%d) bytes long.",
min_password_length)));
/* check if the password contains the username */
ERROR: advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores
SET pg_stash_advice.stash_name = '99bottles';
ERROR: invalid value for parameter "pg_stash_advice.stash_name": "99bottles"
-DETAIL: advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores
+DETAIL: Advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores.
-- Clean up state in dynamic shared memory.
SELECT pg_drop_advice_stash('regress_stash');
pg_drop_advice_stash
ERROR: advice stash name must not contain non-ASCII characters
SET pg_stash_advice.stash_name = 'café';
ERROR: invalid value for parameter "pg_stash_advice.stash_name": "café"
-DETAIL: advice stash name must not contain non-ASCII characters
+DETAIL: Advice stash name must not contain non-ASCII characters.
if (strlen(stash_name) + 1 > NAMEDATALEN)
{
GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
- GUC_check_errdetail("advice stash names may not be longer than %d bytes",
+ GUC_check_errdetail("Advice stash names may not be longer than %d bytes.",
NAMEDATALEN - 1);
return false;
}
if (!pg_is_ascii(stash_name))
{
GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
- GUC_check_errdetail("advice stash name must not contain non-ASCII characters");
+ GUC_check_errdetail("Advice stash name must not contain non-ASCII characters.");
return false;
}
if (!pgsa_is_identifier(stash_name))
{
GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
- GUC_check_errdetail("advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores");
+ GUC_check_errdetail("Advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores.");
return false;
}
ereport(ERROR,
errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory"),
- errdetail("could not insert advice string into shared hash table"));
+ errdetail("Could not insert advice string into shared hash table."));
}
/* Update the entry and release the lock. */
-- Test COPY TO when foreign table is partition
COPY async_pt TO stdout; --error
ERROR: cannot copy from foreign table "async_p1"
-DETAIL: Partition "async_p1" is a foreign table in partitioned table "async_pt"
+DETAIL: Partition "async_p1" is a foreign table in partitioned table "async_pt".
HINT: Try the COPY (SELECT ...) TO variant.
DROP FOREIGN TABLE async_p3;
DROP TABLE base_tbl3;
ereport(ERROR,
errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("cannot copy from foreign table \"%s\"", relation_name),
- errdetail("Partition \"%s\" is a foreign table in partitioned table \"%s\"",
+ errdetail("Partition \"%s\" is a foreign table in partitioned table \"%s\".",
relation_name, RelationGetRelationName(rel)),
errhint("Try the COPY (SELECT ...) TO variant."));
}
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("extension \"%s\" does not support SET SCHEMA",
NameStr(extForm->extname)),
- errdetail("%s is not in the extension's schema \"%s\"",
+ errdetail("%s is not in the extension's schema \"%s\".",
getObjectDescription(&dep, false),
get_namespace_name(oldNspOid))));
}
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot alter type of a column used by a function or procedure"),
- errdetail("%s depends on column \"%s\"",
+ errdetail("%s depends on column \"%s\".",
getObjectDescription(&foundObject, false),
colName)));
break;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot alter type of a column used by a view or rule"),
- errdetail("%s depends on column \"%s\"",
+ errdetail("%s depends on column \"%s\".",
getObjectDescription(&foundObject, false),
colName)));
break;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot alter type of a column used in a trigger definition"),
- errdetail("%s depends on column \"%s\"",
+ errdetail("%s depends on column \"%s\".",
getObjectDescription(&foundObject, false),
colName)));
break;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot alter type of a column used in a policy definition"),
- errdetail("%s depends on column \"%s\"",
+ errdetail("%s depends on column \"%s\".",
getObjectDescription(&foundObject, false),
colName)));
break;
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot alter type of a column used by a publication WHERE clause"),
- errdetail("%s depends on column \"%s\"",
+ errdetail("%s depends on column \"%s\".",
getObjectDescription(&foundObject, false),
colName)));
break;
ereport(isServerStart ? FATAL : LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("could not set SSL protocol version range"),
- errdetail("\"%s\" cannot be higher than \"%s\"",
+ errdetail("\"%s\" cannot be higher than \"%s\".",
"ssl_min_protocol_version",
"ssl_max_protocol_version")));
goto error;
-- fails, as function dep_req1 is not in the same schema as the extension.
ALTER EXTENSION test_ext_req_schema1 SET SCHEMA test_func_dep3;
ERROR: extension "test_ext_req_schema1" does not support SET SCHEMA
-DETAIL: function test_func_dep2.dep_req1() is not in the extension's schema "test_func_dep1"
+DETAIL: function test_func_dep2.dep_req1() is not in the extension's schema "test_func_dep1".
-- Move back the function, and the extension can be moved.
ALTER FUNCTION test_func_dep2.dep_req1() SET SCHEMA test_func_dep1;
ALTER EXTENSION test_ext_req_schema1 SET SCHEMA test_func_dep3;
-- likewise, altering a referenced column's type is prohibited ...
alter table tt14t alter column f4 type integer using f4::integer; -- fail
ERROR: cannot alter type of a column used by a view or rule
-DETAIL: rule _RETURN on view tt14v depends on column "f4"
+DETAIL: rule _RETURN on view tt14v depends on column "f4".
-- ... but some bug might let it happen, so check defenses
begin;
-- destroy the dependency entry that prevents the ALTER:
rollback;
alter table users alter column seq type numeric; -- fail, view has reference
ERROR: cannot alter type of a column used by a view or rule
-DETAIL: rule _RETURN on view usersview depends on column "seq"
+DETAIL: rule _RETURN on view usersview depends on column "seq".
-- likewise, check we don't crash if the dependency goes wrong
begin;
-- destroy the dependency entry that prevents the ALTER: