mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
pgindent run before PG 9.1 beta 1.
This commit is contained in:
@ -2608,7 +2608,7 @@ RI_FKey_keyequal_upd_fk(Trigger *trigger, Relation fk_rel,
|
||||
* This is not a trigger procedure, but is called during ALTER TABLE
|
||||
* ADD FOREIGN KEY to validate the initial table contents.
|
||||
*
|
||||
* We expect that the caller has made provision to prevent any problems
|
||||
* We expect that the caller has made provision to prevent any problems
|
||||
* caused by concurrent actions. This could be either by locking rel and
|
||||
* pkrel at ShareRowExclusiveLock or higher, or by otherwise ensuring
|
||||
* that triggers implementing the checks are already active.
|
||||
@ -2629,8 +2629,8 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
|
||||
char fkrelname[MAX_QUOTED_REL_NAME_LEN];
|
||||
char pkattname[MAX_QUOTED_NAME_LEN + 3];
|
||||
char fkattname[MAX_QUOTED_NAME_LEN + 3];
|
||||
RangeTblEntry *pkrte;
|
||||
RangeTblEntry *fkrte;
|
||||
RangeTblEntry *pkrte;
|
||||
RangeTblEntry *fkrte;
|
||||
const char *sep;
|
||||
int i;
|
||||
int old_work_mem;
|
||||
@ -2662,7 +2662,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
|
||||
|
||||
for (i = 0; i < riinfo.nkeys; i++)
|
||||
{
|
||||
int attno;
|
||||
int attno;
|
||||
|
||||
attno = riinfo.pk_attnums[i] - FirstLowInvalidHeapAttributeNumber;
|
||||
pkrte->selectedCols = bms_add_member(pkrte->selectedCols, attno);
|
||||
@ -2789,10 +2789,10 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
|
||||
|
||||
/*
|
||||
* Run the plan. For safety we force a current snapshot to be used. (In
|
||||
* transaction-snapshot mode, this arguably violates transaction
|
||||
* isolation rules, but we really haven't got much choice.)
|
||||
* We don't need to register the snapshot, because SPI_execute_snapshot
|
||||
* will see to it. We need at most one tuple returned, so pass limit = 1.
|
||||
* transaction-snapshot mode, this arguably violates transaction isolation
|
||||
* rules, but we really haven't got much choice.) We don't need to
|
||||
* register the snapshot, because SPI_execute_snapshot will see to it. We
|
||||
* need at most one tuple returned, so pass limit = 1.
|
||||
*/
|
||||
spi_result = SPI_execute_snapshot(qplan,
|
||||
NULL, NULL,
|
||||
@ -3337,8 +3337,8 @@ ri_PerformCheck(RI_QueryKey *qkey, SPIPlanPtr qplan,
|
||||
/*
|
||||
* In READ COMMITTED mode, we just need to use an up-to-date regular
|
||||
* snapshot, and we will see all rows that could be interesting. But in
|
||||
* transaction-snapshot mode, we can't change the transaction snapshot.
|
||||
* If the caller passes detectNewRows == false then it's okay to do the query
|
||||
* transaction-snapshot mode, we can't change the transaction snapshot. If
|
||||
* the caller passes detectNewRows == false then it's okay to do the query
|
||||
* with the transaction snapshot; otherwise we use a current snapshot, and
|
||||
* tell the executor to error out if it finds any rows under the current
|
||||
* snapshot that wouldn't be visible per the transaction snapshot. Note
|
||||
|
Reference in New Issue
Block a user