Indent new rename.c for Tom Lane.
This commit is contained in:
parent
b52950cc3d
commit
a83bd89d00
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.62 2001/11/12 00:46:36 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.63 2001/11/12 01:34:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -47,8 +47,8 @@
|
|||||||
|
|
||||||
static int ri_trigger_type(Oid tgfoid);
|
static int ri_trigger_type(Oid tgfoid);
|
||||||
static void update_ri_trigger_args(Oid relid,
|
static void update_ri_trigger_args(Oid relid,
|
||||||
const char* oldname,
|
const char *oldname,
|
||||||
const char* newname,
|
const char *newname,
|
||||||
bool fk_scan,
|
bool fk_scan,
|
||||||
bool update_relname);
|
bool update_relname);
|
||||||
|
|
||||||
@ -425,8 +425,8 @@ ri_trigger_type(Oid tgfoid)
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
update_ri_trigger_args(Oid relid,
|
update_ri_trigger_args(Oid relid,
|
||||||
const char* oldname,
|
const char *oldname,
|
||||||
const char* newname,
|
const char *newname,
|
||||||
bool fk_scan,
|
bool fk_scan,
|
||||||
bool update_relname)
|
bool update_relname)
|
||||||
{
|
{
|
||||||
@ -457,8 +457,8 @@ update_ri_trigger_args(Oid relid,
|
|||||||
Buffer buffer;
|
Buffer buffer;
|
||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
Form_pg_trigger pg_trigger;
|
Form_pg_trigger pg_trigger;
|
||||||
bytea* val;
|
bytea *val;
|
||||||
bytea* newtgargs;
|
bytea *newtgargs;
|
||||||
bool isnull;
|
bool isnull;
|
||||||
int tg_type;
|
int tg_type;
|
||||||
bool examine_pk;
|
bool examine_pk;
|
||||||
@ -487,8 +487,8 @@ update_ri_trigger_args(Oid relid,
|
|||||||
/*
|
/*
|
||||||
* It is an RI trigger, so parse the tgargs bytea.
|
* It is an RI trigger, so parse the tgargs bytea.
|
||||||
*
|
*
|
||||||
* NB: we assume the field will never be compressed or moved
|
* NB: we assume the field will never be compressed or moved out of
|
||||||
* out of line; so does trigger.c ...
|
* line; so does trigger.c ...
|
||||||
*/
|
*/
|
||||||
tgnargs = pg_trigger->tgnargs;
|
tgnargs = pg_trigger->tgnargs;
|
||||||
val = (bytea *) fastgetattr(tuple,
|
val = (bytea *) fastgetattr(tuple,
|
||||||
@ -505,15 +505,15 @@ update_ri_trigger_args(Oid relid,
|
|||||||
for (i = 0; i < tgnargs; i++)
|
for (i = 0; i < tgnargs; i++)
|
||||||
{
|
{
|
||||||
arga[i] = argp;
|
arga[i] = argp;
|
||||||
argp += strlen(argp)+1;
|
argp += strlen(argp) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Figure out which item(s) to look at. If the trigger is
|
* Figure out which item(s) to look at. If the trigger is
|
||||||
* primary-key type and attached to my rel, I should look at
|
* primary-key type and attached to my rel, I should look at the
|
||||||
* the PK fields; if it is foreign-key type and attached to my
|
* PK fields; if it is foreign-key type and attached to my rel, I
|
||||||
* rel, I should look at the FK fields. But the opposite rule
|
* should look at the FK fields. But the opposite rule holds when
|
||||||
* holds when examining triggers found by tgconstrrel search.
|
* examining triggers found by tgconstrrel search.
|
||||||
*/
|
*/
|
||||||
examine_pk = (tg_type == RI_TRIGGER_PK) == (!fk_scan);
|
examine_pk = (tg_type == RI_TRIGGER_PK) == (!fk_scan);
|
||||||
|
|
||||||
@ -608,9 +608,9 @@ update_ri_trigger_args(Oid relid,
|
|||||||
heap_close(tgrel, RowExclusiveLock);
|
heap_close(tgrel, RowExclusiveLock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increment cmd counter to make updates visible; this is needed
|
* Increment cmd counter to make updates visible; this is needed in
|
||||||
* in case the same tuple has to be updated again by next pass
|
* case the same tuple has to be updated again by next pass (can
|
||||||
* (can happen in case of a self-referential FK relationship).
|
* happen in case of a self-referential FK relationship).
|
||||||
*/
|
*/
|
||||||
CommandCounterIncrement();
|
CommandCounterIncrement();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user