}
/*
- * Maps an ReplicationSlotInvalidationCause to the invalidation
+ * Maps a ReplicationSlotInvalidationCause to the invalidation
* reason for a replication slot.
*/
const char *
{
/*
* 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;
}
(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())
{
/*
* 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,
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;
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.
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,
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
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)
/*
* 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().
*/
# 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'/]);
{
$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'/]);
}
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
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;
(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;
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');
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)');
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)');
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)');
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)');
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;
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;
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;
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)');
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)');
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)');
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)');