mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
Fix misc typos, mostly in comments
The only user-visible change is the fix in the "malformed
pg_dependencies" error detail. That one is new in commit e1405aa5e3,
so no backpatching required.
This commit is contained in:
@@ -2919,7 +2919,7 @@ GetSlotInvalidationCause(const char *cause_name)
|
||||
}
|
||||
|
||||
/*
|
||||
* Maps an ReplicationSlotInvalidationCause to the invalidation
|
||||
* Maps a ReplicationSlotInvalidationCause to the invalidation
|
||||
* reason for a replication slot.
|
||||
*/
|
||||
const char *
|
||||
|
||||
@@ -39,8 +39,8 @@ AioProcs(void)
|
||||
{
|
||||
/*
|
||||
* While AIO workers don't need their own AIO context, we can't currently
|
||||
* guarantee nothing gets assigned to the a ProcNumber for an IO worker if
|
||||
* we just subtracted MAX_IO_WORKERS.
|
||||
* guarantee that nothing gets assigned to an IO worker's ProcNumber if we
|
||||
* just subtracted MAX_IO_WORKERS.
|
||||
*/
|
||||
return MaxBackends + NUM_AUXILIARY_PROCS;
|
||||
}
|
||||
|
||||
@@ -1531,15 +1531,15 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
|
||||
(cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL)))
|
||||
{
|
||||
/*
|
||||
* We expect an POLLHUP when the remote end is closed, but because
|
||||
* We expect a POLLHUP when the remote end is closed, but because
|
||||
* we don't expect the pipe to become readable or to have any
|
||||
* errors either, treat those cases as postmaster death, too.
|
||||
*
|
||||
* Be paranoid about a spurious event signaling the postmaster as
|
||||
* being dead. There have been reports about that happening with
|
||||
* older primitives (select(2) to be specific), and a spurious
|
||||
* WL_POSTMASTER_DEATH event would be painful. Re-checking doesn't
|
||||
* cost much.
|
||||
* WL_POSTMASTER_DEATH event would be painful. Re-checking
|
||||
* doesn't cost much.
|
||||
*/
|
||||
if (!PostmasterIsAliveInternal())
|
||||
{
|
||||
|
||||
@@ -4364,7 +4364,7 @@ PostgresMain(const char *dbname, const char *username)
|
||||
/*
|
||||
* Create memory context and buffer used for RowDescription messages. As
|
||||
* SendRowDescriptionMessage(), via exec_describe_statement_message(), is
|
||||
* frequently executed for ever single statement, we don't want to
|
||||
* frequently executed for every single statement, we don't want to
|
||||
* allocate a separate buffer every time.
|
||||
*/
|
||||
row_description_context = AllocSetContextCreate(TopMemoryContext,
|
||||
|
||||
@@ -298,7 +298,7 @@ dependencies_array_end(void *state)
|
||||
errsave(parse->escontext,
|
||||
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
||||
errmsg("malformed pg_dependencies: \"%s\"", parse->str),
|
||||
errdetail("The \"%s\" key must be an non-empty array.",
|
||||
errdetail("The \"%s\" key must be a non-empty array.",
|
||||
PG_DEPENDENCIES_KEY_ATTRIBUTES));
|
||||
break;
|
||||
|
||||
|
||||
@@ -9661,7 +9661,7 @@ get_rule_expr(Node *node, deparse_context *context,
|
||||
bool need_parens;
|
||||
|
||||
/*
|
||||
* Parenthesize the argument unless it's an SubscriptingRef or
|
||||
* Parenthesize the argument unless it's a SubscriptingRef or
|
||||
* another FieldSelect. Note in particular that it would be
|
||||
* WRONG to not parenthesize a Var argument; simplicity is not
|
||||
* the issue here, having the right number of names is.
|
||||
|
||||
2
src/backend/utils/cache/typcache.c
vendored
2
src/backend/utils/cache/typcache.c
vendored
@@ -2429,7 +2429,7 @@ TypeCacheRelCallback(Datum arg, Oid relid)
|
||||
RelIdToTypeIdCacheEntry *relentry;
|
||||
|
||||
/*
|
||||
* Find an RelIdToTypeIdCacheHash entry, which should exist as soon as
|
||||
* Find a RelIdToTypeIdCacheHash entry, which should exist as soon as
|
||||
* corresponding typcache entry has something to clean.
|
||||
*/
|
||||
relentry = (RelIdToTypeIdCacheEntry *) hash_search(RelIdToTypeIdCacheHash,
|
||||
|
||||
@@ -816,9 +816,9 @@ InitPostgres(const char *in_dbname, Oid dboid,
|
||||
RelationCacheInitializePhase2();
|
||||
|
||||
/*
|
||||
* Set up process-exit callback to do pre-shutdown cleanup. This is the
|
||||
* one of the first before_shmem_exit callbacks we register; thus, this
|
||||
* will be one the last things we do before low-level modules like the
|
||||
* Set up process-exit callback to do pre-shutdown cleanup. This is one
|
||||
* of the first before_shmem_exit callbacks we register; thus, this will
|
||||
* be one of the last things we do before low-level modules like the
|
||||
* buffer manager begin to close down. We need to have this in place
|
||||
* before we begin our first transaction --- if we fail during the
|
||||
* initialization transaction, as is entirely possible, we need the
|
||||
|
||||
@@ -114,7 +114,7 @@ get_canonical_class(char32_t code)
|
||||
const pg_unicode_decomposition *entry = get_code_entry(code);
|
||||
|
||||
/*
|
||||
* If no entries are found, the character used is either an Hangul
|
||||
* If no entries are found, the character used is either a Hangul
|
||||
* character or a character with a class of 0 and no decompositions.
|
||||
*/
|
||||
if (!entry)
|
||||
|
||||
@@ -517,7 +517,7 @@ dlist_has_prev(const dlist_head *head, const dlist_node *node)
|
||||
|
||||
/*
|
||||
* Check if node is detached. A node is only detached if it either has been
|
||||
* initialized with dlist_init_node(), or deleted with
|
||||
* initialized with dlist_node_init(), or deleted with
|
||||
* dlist_delete_thoroughly() / dlist_delete_from_thoroughly() /
|
||||
* dclist_delete_from_thoroughly().
|
||||
*/
|
||||
|
||||
@@ -126,7 +126,7 @@ $node2->stop();
|
||||
# working one.
|
||||
$node3->connect_ok(
|
||||
"host=pg-loadbalancetest port=$port load_balance_hosts=disable",
|
||||
"load_balance_hosts=disable continues until it connects to the a working node",
|
||||
"load_balance_hosts=disable continues until it connects to a working node",
|
||||
sql => "SELECT 'connect3'",
|
||||
log_like => [qr/statement: SELECT 'connect3'/]);
|
||||
|
||||
@@ -136,7 +136,7 @@ foreach my $i (1 .. 5)
|
||||
{
|
||||
$node3->connect_ok(
|
||||
"host=pg-loadbalancetest port=$port load_balance_hosts=random",
|
||||
"load_balance_hosts=random continues until it connects to the a working node",
|
||||
"load_balance_hosts=random continues until it connects to a working node",
|
||||
sql => "SELECT 'connect4'",
|
||||
log_like => [qr/statement: SELECT 'connect4'/]);
|
||||
}
|
||||
|
||||
@@ -3432,7 +3432,7 @@ CREATE TABLE fkpart13_t3 (
|
||||
INSERT INTO fkpart13_t1 (a) VALUES (1);
|
||||
INSERT INTO fkpart13_t2 (part_id) VALUES (1);
|
||||
INSERT INTO fkpart13_t3 (a) VALUES (1);
|
||||
-- Test a cascading update works correctly with with the dropped column
|
||||
-- Test that a cascading update works correctly with the dropped column
|
||||
UPDATE fkpart13_t1 SET a = 2 WHERE a = 1;
|
||||
SELECT tableoid::regclass,* FROM fkpart13_t2;
|
||||
tableoid | part_id
|
||||
|
||||
@@ -114,7 +114,7 @@ select relname from pg_locks l, pg_class c
|
||||
ROLLBACK;
|
||||
BEGIN TRANSACTION;
|
||||
LOCK TABLE lock_view6 IN EXCLUSIVE MODE;
|
||||
-- lock_view6 an lock_tbl1 are locked.
|
||||
-- lock_view6 and lock_tbl1 are locked.
|
||||
select relname from pg_locks l, pg_class c
|
||||
where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock'
|
||||
order by relname;
|
||||
|
||||
@@ -63,7 +63,7 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b =
|
||||
(4 rows)
|
||||
|
||||
-- inner join with partially-redundant join clauses
|
||||
-- (avoid a mergejoin, because the planner thinks that an non-partitionwise
|
||||
-- (avoid a mergejoin, because the planner thinks that a non-partitionwise
|
||||
-- merge join is the cheapest plan, and we want to test a partitionwise join)
|
||||
BEGIN;
|
||||
SET LOCAL enable_mergejoin = false;
|
||||
|
||||
@@ -295,16 +295,16 @@ SELECT '[{"attributes": [], "dependency": 2, "degree": 1}]' ::pg_dependencies;
|
||||
ERROR: malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]"
|
||||
LINE 1: SELECT '[{"attributes": [], "dependency": 2, "degree": 1}]' ...
|
||||
^
|
||||
DETAIL: The "attributes" key must be an non-empty array.
|
||||
DETAIL: The "attributes" key must be a non-empty array.
|
||||
SELECT '[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]'::pg_dependencies;
|
||||
ERROR: malformed pg_dependencies: "[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]"
|
||||
LINE 1: SELECT '[{"attributes" : {"a": 1}, "dependency" : 4, "degree...
|
||||
^
|
||||
DETAIL: Value of "attributes" must be an array of attribute numbers.
|
||||
SELECT * FROM pg_input_error_info('[{"attributes": [], "dependency": 2, "degree": 1}]', 'pg_dependencies');
|
||||
message | detail | hint | sql_error_code
|
||||
---------------------------------------------------------------------------------+--------------------------------------------------+------+----------------
|
||||
malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]" | The "attributes" key must be an non-empty array. | | 22P02
|
||||
message | detail | hint | sql_error_code
|
||||
---------------------------------------------------------------------------------+-------------------------------------------------+------+----------------
|
||||
malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]" | The "attributes" key must be a non-empty array. | | 22P02
|
||||
(1 row)
|
||||
|
||||
SELECT * FROM pg_input_error_info('[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]', 'pg_dependencies');
|
||||
|
||||
@@ -912,7 +912,7 @@ CREATE TABLE temporal_partitioned (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
|
||||
@@ -947,7 +947,7 @@ CREATE TABLE temporal_partitioned (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
|
||||
@@ -2260,7 +2260,7 @@ CREATE TABLE temporal_partitioned_rng (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 partition OF temporal_partitioned_rng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)');
|
||||
CREATE TABLE tp2 partition OF temporal_partitioned_rng FOR VALUES IN ('[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)');
|
||||
@@ -2382,7 +2382,7 @@ CREATE TABLE temporal_partitioned_mltrng (
|
||||
id int4range,
|
||||
valid_at datemultirange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)', '[13,14)', '[15,16)', '[17,18)', '[19,20)', '[21,22)', '[23,24)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[0,1)', '[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)', '[14,15)', '[16,17)', '[18,19)', '[20,21)', '[22,23)', '[24,25)');
|
||||
|
||||
@@ -2421,7 +2421,7 @@ INSERT INTO fkpart13_t1 (a) VALUES (1);
|
||||
INSERT INTO fkpart13_t2 (part_id) VALUES (1);
|
||||
INSERT INTO fkpart13_t3 (a) VALUES (1);
|
||||
|
||||
-- Test a cascading update works correctly with with the dropped column
|
||||
-- Test that a cascading update works correctly with the dropped column
|
||||
UPDATE fkpart13_t1 SET a = 2 WHERE a = 1;
|
||||
SELECT tableoid::regclass,* FROM fkpart13_t2;
|
||||
SELECT tableoid::regclass,* FROM fkpart13_t3;
|
||||
|
||||
@@ -85,7 +85,7 @@ select relname from pg_locks l, pg_class c
|
||||
ROLLBACK;
|
||||
BEGIN TRANSACTION;
|
||||
LOCK TABLE lock_view6 IN EXCLUSIVE MODE;
|
||||
-- lock_view6 an lock_tbl1 are locked.
|
||||
-- lock_view6 and lock_tbl1 are locked.
|
||||
select relname from pg_locks l, pg_class c
|
||||
where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock'
|
||||
order by relname;
|
||||
|
||||
@@ -35,7 +35,7 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b =
|
||||
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b = 0 ORDER BY t1.a, t2.b;
|
||||
|
||||
-- inner join with partially-redundant join clauses
|
||||
-- (avoid a mergejoin, because the planner thinks that an non-partitionwise
|
||||
-- (avoid a mergejoin, because the planner thinks that a non-partitionwise
|
||||
-- merge join is the cheapest plan, and we want to test a partitionwise join)
|
||||
BEGIN;
|
||||
SET LOCAL enable_mergejoin = false;
|
||||
|
||||
@@ -659,7 +659,7 @@ CREATE TABLE temporal_partitioned (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
|
||||
@@ -677,7 +677,7 @@ CREATE TABLE temporal_partitioned (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
|
||||
@@ -1769,7 +1769,7 @@ CREATE TABLE temporal_partitioned_rng (
|
||||
id int4range,
|
||||
valid_at daterange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 partition OF temporal_partitioned_rng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)');
|
||||
CREATE TABLE tp2 partition OF temporal_partitioned_rng FOR VALUES IN ('[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)');
|
||||
@@ -1899,7 +1899,7 @@ CREATE TABLE temporal_partitioned_mltrng (
|
||||
id int4range,
|
||||
valid_at datemultirange,
|
||||
name text,
|
||||
CONSTRAINT temporal_paritioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
CONSTRAINT temporal_partitioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
|
||||
) PARTITION BY LIST (id);
|
||||
CREATE TABLE tp1 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)', '[13,14)', '[15,16)', '[17,18)', '[19,20)', '[21,22)', '[23,24)');
|
||||
CREATE TABLE tp2 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[0,1)', '[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)', '[14,15)', '[16,17)', '[18,19)', '[20,21)', '[22,23)', '[24,25)');
|
||||
|
||||
Reference in New Issue
Block a user